Skip to content

comfy-cli install --cpu still installs CUDA version of PyTorch #344

@Xyc2016

Description

@Xyc2016

Describe the bug
When running comfy-cli install with the --cpu flag, it still installs the CUDA version of PyTorch instead of the CPU-only version.

To Reproduce
Steps to reproduce the behavior:

set -ex

rm -rf ~/comfy
rm -rf learn-comfy

uv init --python=3.12 learn-comfy
cd learn-comfy

uv add comfy-cli==1.5.3 pip==25.3

uv run comfy --skip-prompt install --cpu --skip-manager

uv pip show torch

Expected behavior
PyTorch should be installed as the CPU-only version from https://download.pytorch.org/whl/cpu, not the CUDA version.

Example output

Installing for CPU
Installing from repository 'https://github.com/comfyanonymous/ComfyUI' to '/home/xyc/comfy/ComfyUI'
...
Skipping installation of ComfyUI-Manager. (by --skip-manager)
...
ComfyUI is installed at: /home/xyc/comfy/ComfyUI
+ uv pip show torch
Name: torch
Version: 2.9.1
Location: /home/xyc/learn/learn-comfy/.venv/lib/python3.12/site-packages
Requires: filelock, fsspec, jinja2, networkx, nvidia-cublas-cu12, nvidia-cuda-cupti-cu12, ...

Additional context

  • Python 3.12.3
  • uv 0.9.21
  • comfy-cli 1.5.3
  • Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions