Skip to content

Commit 9f1bda2

Browse files
committed
simplify standalone command by removing redundant gpu options
1 parent 577fdfc commit 9f1bda2

File tree

2 files changed

+2
-82
lines changed

2 files changed

+2
-82
lines changed

comfy_cli/cmdline.py

Lines changed: 1 addition & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -568,48 +568,6 @@ def standalone(
568568
help="Create standalone Python for specified processor",
569569
),
570570
] = None,
571-
nvidia: Annotated[
572-
Optional[bool],
573-
typer.Option(
574-
show_default=False,
575-
help="Create standalone Python for Nvidia gpu",
576-
callback=g_gpu_exclusivity.validate,
577-
),
578-
] = None,
579-
cuda_version: Annotated[CUDAVersion, typer.Option(show_default=True)] = CUDAVersion.v12_1,
580-
amd: Annotated[
581-
Optional[bool],
582-
typer.Option(
583-
show_default=False,
584-
help="Create standalone Python for AMD gpu",
585-
callback=g_gpu_exclusivity.validate,
586-
),
587-
] = None,
588-
m_series: Annotated[
589-
Optional[bool],
590-
typer.Option(
591-
show_default=False,
592-
help="Create standalone Python for Mac M-Series gpu",
593-
callback=g_gpu_exclusivity.validate,
594-
),
595-
] = None,
596-
intel_arc: Annotated[
597-
Optional[bool],
598-
typer.Option(
599-
hidden=True,
600-
show_default=False,
601-
help="(Beta support) Create standalone Python for Intel Arc gpu, based on https://github.com/comfyanonymous/ComfyUI/pull/3439",
602-
callback=g_gpu_exclusivity.validate,
603-
),
604-
] = None,
605-
cpu: Annotated[
606-
Optional[bool],
607-
typer.Option(
608-
show_default=False,
609-
help="Create standalone Python for CPU",
610-
callback=g_gpu_exclusivity.validate,
611-
),
612-
] = None,
613571
rehydrate: Annotated[
614572
bool,
615573
typer.Option(
@@ -623,48 +581,12 @@ def standalone(
623581
platform = utils.get_os() if platform is None else platform
624582
proc = utils.get_proc() if proc is None else proc
625583

626-
if cpu:
627-
gpu = GPU_OPTION.CPU
628-
elif nvidia:
629-
gpu = GPU_OPTION.NVIDIA
630-
elif amd:
631-
gpu = GPU_OPTION.AMD
632-
elif m_series:
633-
gpu = GPU_OPTION.MAC_M_SERIES
634-
elif intel_arc:
635-
gpu = GPU_OPTION.INTEL_ARC
636-
else:
637-
if platform == constants.OS.MACOS:
638-
gpu = ui.prompt_select_enum(
639-
"What type of Mac do you have?",
640-
[GPU_OPTION.MAC_M_SERIES, GPU_OPTION.MAC_INTEL],
641-
)
642-
else:
643-
gpu = ui.prompt_select_enum(
644-
"What GPU do you have?",
645-
[GPU_OPTION.NVIDIA, GPU_OPTION.AMD, GPU_OPTION.INTEL_ARC, GPU_OPTION.CPU],
646-
)
647-
648-
if gpu == GPU_OPTION.INTEL_ARC:
649-
print("[bold yellow]Installing on Intel ARC is not yet completely supported[/bold yellow]")
650-
env_check = env_checker.EnvChecker()
651-
if env_check.conda_env is None:
652-
print("[bold red]Intel ARC support requires conda environment to be activated.[/bold red]")
653-
raise typer.Exit(code=1)
654-
if intel_arc is None:
655-
confirm_result = ui.prompt_confirm_action(
656-
"Are you sure you want to try beta install feature on Intel ARC?", True
657-
)
658-
if not confirm_result:
659-
raise typer.Exit(code=0)
660-
print("[bold yellow]Installing on Intel ARC is in beta stage.[/bold yellow]")
661-
662584
if rehydrate:
663585
sty = StandalonePython.FromTarball(fpath="python.tgz")
664586
sty.rehydrate_comfy_deps()
665587
else:
666588
sty = StandalonePython.FromDistro(platform=platform, proc=proc)
667-
sty.dehydrate_comfy_deps(comfyDir=comfy_path, gpu=gpu, extraSpecs=cli_spec)
589+
sty.dehydrate_comfy_deps(comfyDir=comfy_path, extraSpecs=cli_spec)
668590
sty.to_tarball()
669591

670592

comfy_cli/standalone.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from rich.progress import Progress, TextColumn
1111
from rich.table import Table
1212

13-
from comfy_cli.constants import GPU_OPTION, OS, PROC
13+
from comfy_cli.constants import OS, PROC
1414
from comfy_cli.typing import PathLike
1515
from comfy_cli.utils import download_progress, get_os, get_proc
1616
from comfy_cli.uv import DependencyCompiler
@@ -152,13 +152,11 @@ def install_comfy(self, *args: list[str], gpu_arg: str = "--nvidia"):
152152
def dehydrate_comfy_deps(
153153
self,
154154
comfyDir: PathLike,
155-
gpu: GPU_OPTION,
156155
extraSpecs: Optional[list[str]] = None,
157156
):
158157
self.dep_comp = DependencyCompiler(
159158
cwd=comfyDir,
160159
executable=self.executable,
161-
gpu=gpu,
162160
outDir=self.rpath,
163161
extraSpecs=extraSpecs,
164162
)

0 commit comments

Comments
 (0)