I’m trying to set up ComfyUI on Ubuntu 22.04.4 LTS but having issues with CUDA. I have followed the tutorial here: https://medium.com/@yushantripleseven/installing-comfyui-linux-windows-b59a57af61b6. When I try to run ComfyUI python3 main.py
I get an error RuntimeError: No CUDA GPUs are available
. From what I have read this suggests that Pytorch is missing (even though on Linux I’ve read that Pytorch is installed as part of pip install -r requirements.txt
, which I have done). Running pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
withing the venv of ComfyUI says that the requirements are already satisfied:
Requirement already satisfied: torch in ./venv/lib/python3.10/site-packages (2.4.0+cu121)
Requirement already satisfied: torchvision in ./venv/lib/python3.10/site-packages (0.19.0+cu121)
Requirement already satisfied: torchaudio in ./venv/lib/python3.10/site-packages (2.4.0+cu121)
etc
but ComfyUI won’t launch. It continues to say RuntimeError: No CUDA GPUs are available
. What am I doing wrong?
Make sure you downloaded CUDA. The toolkit does not come preinstalled with Nvidia Geforce or Nvidia drivers.
If you did or have installed it previously, check your CUDA version with nvcc --version
in the command line. It will throw an error if CUDA isn’t installed.
The command nvidia-smi
in the command line will tell you the highest version of CUDA that your GPU supports.
The command you provided, pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
, downloads CUDA 11.8, so if your GPU lacks support, you won’t be able to install the program.
1