Overview

These are my short notes on how to run ComfyUI on an NVIDIA 5090 GPU. The Blackwell architecture has been released Q4 2024, and is supported by nightly >= 12.8 PyTorch builds.

Common Error: If you get either of the following errors on a 5090 GPU, the solution is to use a nightly PyTorch build that supports CUDA capability sm_120:

  • CUDA error: no kernel image is available for execution on the device
  • NVIDIA GeForce RTX 5090 with CUDA capability sm_120 is not compatible with the current PyTorch installation. The current PyTorch install supports CUDA capabilities sm_50 sm_60 sm_70 sm_75 sm_80 sm_86 sm_90.

Also rule out an NVIDIA driver version mismatch between the nvidia-smi reported CUDA version and your installed PyTorch version.

Installation Steps

Clone the ComfyUI repository:

git clone https://github.com/comfyanonymous/ComfyUI.git .

Install PyTorch and related packages:

. venv/bin/activate && pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu129 onnxruntime-gpu numba diffusers

Notice we are using a nightly build for CUDA 12.9: https://download.pytorch.org/whl/nightly/cu129

Install ComfyUI dependencies:

. venv/bin/activate && pip install -r requirements.txt

Run ComfyUI:

. venv/bin/activate && python main.py --listen 0.0.0.0

Makefile

Here is a Makefile with all of the above:

all:
	python3.10 -m venv venv
	. venv/bin/activate && pip install --pre torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/nightly/cu129 onnxruntime-gpu numba diffusers
	. venv/bin/activate && pip install  opencv-contrib-python==4.8.1.78 opencv-python==4.8.1.78 opencv-python-headless==4.7.0.72
	. venv/bin/activate && pip install -r requirements.txt
run:
	. venv/bin/activate && python main.py --listen 0.0.0.0

Run make all to install dependencies, and make run to start the web UI.

Docker Container

Here is the link to my ComfyUI Docker container:

https://github.com/fgheorghe/comfyui