The message
torch.AcceleratorError: 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.
Affects: ComfyUI
Why is this happening?
Each PyTorch version is built only for certain GPU generations. RTX-50 cards (Blackwell, sm_120) need a PyTorch version with CUDA 12.8 or newer. Conversely, the CUDA 12.8 and CUDA 13 versions from PyTorch 2.8 onward no longer support GTX-900 and GTX-10 cards (Maxwell, Pascal). So if you use an old package with a new card or a new package with an old card, you’ll get this error.
How to fix it
- Find out which card you have:
nvidia-smiin the command prompt shows the name. - RTX 50 (e.g. 5060 to 5090): Download the current Portable package or the current desktop app through the ComfyUI download page. Both now use CUDA 13.0. Manually:
pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu130in the activated venv. - RTX 20, 30, and 40: The normal current package (CUDA 13.0) works. For old installations, updating PyTorch as above helps.
- GTX 10 and older: Use the Portable package with the add-on "cu126" (Python 3.12), which is explicitly intended for these cards. Manually: install PyTorch from
https://download.pytorch.org/whl/cu126. - Note for GTX-10 cards: According to PyTorch, 2.14 is the last version with ready-made CUDA 12.6 packages. Starting with 2.15, there are no more ready-made packages for these cards. In that case, stay on an older PyTorch version; for the Portable version, for example, run
.\python_embeded\python.exe -m pip install torch==2.14.0 torchvision==0.29.0 --index-url https://download.pytorch.org/whl/cu126(run this in theComfyUI_windows_portablefolder). - After switching, check:
python -c "import torch; print(torch.__version__, torch.cuda.get_device_name(0))"(for Portable use.\python_embeded\python.exe).
Better not: Don’t just copy an old ComfyUI installation to a PC with a new graphics card. The bundled PyTorch version often doesn’t match the card.
Set up from scratch again
If it still doesn’t work after that, a fresh setup step by step often helps:
- Set up and maintain ComfyUI on Windows
Desktop or Portable, where the models belong, sharing models with other programs, safely installing custom nodes, updates, startup options … - Your First Image with ComfyUI
Install Comfy Desktop, learn the interface, and create your first AI image with FLUX.2 [small] 4B or Z-Image Turbo. - Your First AI Video with LTX in ComfyUI
Use LTX-2.3 in ComfyUI to create short videos with sound from text or an image. Template, files, settings, and license.
Terms for this
Similar errors
- The NVIDIA driver on your system is too old
- AMD Radeon is not being used, PyTorch is running on the CPU
- CUDAExecutionProvider is not in available provider names (onnxruntime runs only on the CPU)
- hipErrorNoBinaryForGpu: Unable to find code object for all current devices! (ROCm has no matching code for your AMD card)
- Intel Arc not recognized (torch.xpu)
Sources
- https://github.com/Comfy-Org/ComfyUI/discussions/6643
- https://blog.comfy.org/p/how-to-get-comfyui-running-on-your
- https://github.com/Comfy-Org/ComfyUI/blob/master/README.md
- https://docs.comfy.org/installation/comfyui_portable_windows
- https://dev-discuss.pytorch.org/t/cuda-toolkit-version-and-architecture-support-update-maxwell-and-pascal-architecture-support-removed-in-cuda-12-8-and-12-9-builds/3128
- https://dev-discuss.pytorch.org/t/notice-cuda-12-6-wheels-will-no-longer-be-published-from-pytorch-2-15-drops-maxwell-pascal-volta/3432
- https://github.com/pytorch/pytorch/blob/main/torch/cuda/__init__.py
- https://forum.comfy.org/t/unable-to-run-comfyui-due-to-cuda-error/2246
Checked on Oct 21, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.