Skip to content

Commit

Permalink
Add CPU option for install.
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjhuang committed May 8, 2024
1 parent 9c7f68d commit b1d001c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
- name: Run Tests
run: |
comfy --yes env
comfy install
comfy install --cpu
10 changes: 10 additions & 0 deletions comfy_cli/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ def install(
callback=gpu_exclusivity_callback,
),
] = None,
cpu: Annotated[
bool,
typer.Option(
show_default=False,
help="Install for CPU",
callback=gpu_exclusivity_callback,
),
] = None,
commit: Annotated[
Optional[str], typer.Option(help="Specify commit hash for ComfyUI")
] = None,
Expand Down Expand Up @@ -206,6 +214,8 @@ def install(
gpu = GPU_OPTION.AMD
elif m_series:
gpu = GPU_OPTION.M_SERIES
elif cpu:
gpu = None
else:
if platform == constants.OS.MACOS:
gpu = ui.prompt_select_enum(
Expand Down

0 comments on commit b1d001c

Please sign in to comment.