-cpu flag
This commit is contained in:
@@ -69,6 +69,7 @@ def _run_node(cfg: dict) -> None:
|
||||
torch_threads=cfg.get("torch_threads"),
|
||||
torch_interop_threads=cfg.get("torch_interop_threads"),
|
||||
node_name=cfg.get("node_name"),
|
||||
force_cpu=bool(cfg.get("force_cpu", False)),
|
||||
)
|
||||
except Exception as exc:
|
||||
print(f"\nERROR: {exc}", file=sys.stderr, flush=True)
|
||||
@@ -174,6 +175,8 @@ def _cmd_default(args) -> int:
|
||||
overrides["torch_threads"] = args.torch_threads
|
||||
if getattr(args, "torch_interop_threads", None) is not None:
|
||||
overrides["torch_interop_threads"] = args.torch_interop_threads
|
||||
if getattr(args, "cpu", False):
|
||||
overrides["force_cpu"] = True
|
||||
|
||||
if overrides:
|
||||
cfg = merge_cli_overrides(cfg, **overrides)
|
||||
@@ -276,6 +279,7 @@ def _cmd_start(args) -> int:
|
||||
torch_threads=getattr(args, "torch_threads", None),
|
||||
torch_interop_threads=getattr(args, "torch_interop_threads", None),
|
||||
node_name=cfg.get("node_name"),
|
||||
force_cpu=getattr(args, "cpu", False),
|
||||
)
|
||||
except Exception as exc:
|
||||
print(f"ERROR: {exc}", file=sys.stderr, flush=True)
|
||||
@@ -332,6 +336,8 @@ def main() -> None:
|
||||
help="Set PyTorch intra-op CPU worker threads")
|
||||
parser.add_argument("--torch-interop-threads", type=int, metavar="N",
|
||||
help="Set PyTorch inter-op CPU worker threads")
|
||||
parser.add_argument("--cpu", action="store_true",
|
||||
help="Force CPU inference even when a GPU is available")
|
||||
parser.add_argument("--debug", action="store_true", help="Enable verbose node debug logging")
|
||||
parser.add_argument("--no-tui", action="store_true", help="Plain-text output (no rich dashboard)")
|
||||
parser.add_argument("--compact", action="store_true", help="Single-line status output")
|
||||
@@ -372,6 +378,8 @@ def main() -> None:
|
||||
help="Set PyTorch intra-op CPU worker threads")
|
||||
start_cmd.add_argument("--torch-interop-threads", type=int, metavar="N",
|
||||
help="Set PyTorch inter-op CPU worker threads")
|
||||
start_cmd.add_argument("--cpu", action="store_true",
|
||||
help="Force CPU inference even when a GPU is available")
|
||||
start_cmd.add_argument("--debug", action="store_true", help="Enable verbose node debug logging")
|
||||
start_cmd.add_argument("--tracker-source-disabled", action="store_true",
|
||||
help="Skip tracker/peer model-file sources and download from HuggingFace directly")
|
||||
|
||||
Reference in New Issue
Block a user