We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5986e6 commit 3109afaCopy full SHA for 3109afa
comfy_cli/command/install.py
@@ -123,6 +123,27 @@ def pip_install_comfyui_dependencies(
123
+ pip_url,
124
check=False,
125
)
126
+
127
+ # install torch for CPU
128
+ if gpu is None: # Currently, when install for CPU, gpu is None
129
+ pip_url = [
130
+ "--extra-index-url",
131
+ "https://download.pytorch.org/whl/cpu",
132
+ ]
133
+ result = subprocess.run(
134
+ [
135
+ sys.executable,
136
+ "-m",
137
+ "pip",
138
+ "install",
139
+ "torch",
140
+ "torchvision",
141
+ "torchaudio",
142
143
+ + pip_url,
144
+ check=False,
145
+ )
146
147
if result and result.returncode != 0:
148
rprint("Failed to install PyTorch dependencies. Please check your environment (`comfy env`) and try again")
149
sys.exit(1)
0 commit comments