Skip to content

Commit 2ff6f6e

Browse files
authored
[Optional] Checkout specific commit for ComfyUI-Manager (#207)
* Handle case when Github releases rate limit is reached. * Attach GITHUB_TOKEN to releases request if available. * Fix test. * Fix test. * Ruff fix. * Checkout specific commit for ComfyUI-Manager.
1 parent 6525338 commit 2ff6f6e

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

comfy_cli/cmdline.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ def install(
242242
help="Use new fast dependency installer",
243243
),
244244
] = False,
245+
manager_commit: Annotated[
246+
Optional[str],
247+
typer.Option(help="Specify commit hash for ComfyUI-Manager"),
248+
] = None,
245249
):
246250
check_for_updates()
247251
checker = EnvChecker()
@@ -279,6 +283,7 @@ def install(
279283
skip_torch_or_directml=skip_torch_or_directml,
280284
skip_requirement=skip_requirement,
281285
fast_deps=fast_deps,
286+
manager_commit=manager_commit,
282287
)
283288
rprint(f"ComfyUI is installed at: {comfy_path}")
284289
return None
@@ -346,6 +351,7 @@ def install(
346351
skip_torch_or_directml=skip_torch_or_directml,
347352
skip_requirement=skip_requirement,
348353
fast_deps=fast_deps,
354+
manager_commit=manager_commit,
349355
)
350356

351357
rprint(f"ComfyUI is installed at: {comfy_path}")

comfy_cli/command/install.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def execute(
157157
skip_manager: bool,
158158
version: str,
159159
commit: Optional[str] = None,
160+
manager_commit: Optional[str] = None,
160161
gpu: constants.GPU_OPTION = None,
161162
cuda_version: constants.CUDAVersion = constants.CUDAVersion.v12_1,
162163
plat: constants.OS = None,
@@ -238,6 +239,8 @@ def execute(
238239
)
239240
else:
240241
subprocess.run(["git", "clone", manager_url, manager_repo_dir], check=True)
242+
if manager_commit is not None:
243+
subprocess.run(["git", "checkout", manager_commit], check=True, cwd=manager_repo_dir)
241244

242245
if not fast_deps:
243246
pip_install_manager_dependencies(repo_dir)

0 commit comments

Comments
 (0)