diff --git a/comfy_cli/cmdline.py b/comfy_cli/cmdline.py index d903efc..6c71c79 100644 --- a/comfy_cli/cmdline.py +++ b/comfy_cli/cmdline.py @@ -242,6 +242,10 @@ def install( help="Use new fast dependency installer", ), ] = False, + manager_commit: Annotated[ + Optional[str], + typer.Option(help="Specify commit hash for ComfyUI-Manager"), + ] = None, ): check_for_updates() checker = EnvChecker() @@ -279,6 +283,7 @@ def install( skip_torch_or_directml=skip_torch_or_directml, skip_requirement=skip_requirement, fast_deps=fast_deps, + manager_commit=manager_commit, ) rprint(f"ComfyUI is installed at: {comfy_path}") return None @@ -346,6 +351,7 @@ def install( skip_torch_or_directml=skip_torch_or_directml, skip_requirement=skip_requirement, fast_deps=fast_deps, + manager_commit=manager_commit, ) rprint(f"ComfyUI is installed at: {comfy_path}") diff --git a/comfy_cli/command/install.py b/comfy_cli/command/install.py index 1ddf16c..4754ed2 100644 --- a/comfy_cli/command/install.py +++ b/comfy_cli/command/install.py @@ -157,6 +157,7 @@ def execute( skip_manager: bool, version: str, commit: Optional[str] = None, + manager_commit: Optional[str] = None, gpu: constants.GPU_OPTION = None, cuda_version: constants.CUDAVersion = constants.CUDAVersion.v12_1, plat: constants.OS = None, @@ -238,6 +239,8 @@ def execute( ) else: subprocess.run(["git", "clone", manager_url, manager_repo_dir], check=True) + if manager_commit is not None: + subprocess.run(["git", "checkout", manager_commit], check=True, cwd=manager_repo_dir) if not fast_deps: pip_install_manager_dependencies(repo_dir)