ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

no kernel image is available for execution on the device

Open apro008 opened this issue 9 months ago • 15 comments

Expected Behavior

RTX 5060 TI to be supported

Actual Behavior

CUDA error: no kernel image is available for execution on the device CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect. For debugging consider passing CUDA_LAUNCH_BLOCKING=1 Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

Steps to Reproduce

Launch ComfyUI using a machine with an RTX 5060 Ti

Debug Logs

CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.


# ComfyUI Error Report
## Error Details
- **Node ID:** 7
- **Node Type:** CLIPTextEncode
- **Exception Type:** RuntimeError
- **Exception Message:** CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Other

No response

apro008 avatar Apr 19 '25 17:04 apro008

You can take a look at this video walk through instead which might help ur case to for no kernel image errors for 50 series GPUs

https://youtu.be/7JJFJr8doPw?si=6ouNjk-A-Shp0Ho_

pocketpoetry avatar Apr 19 '25 18:04 pocketpoetry

pip uninstall torch
pip uninstall torchvision
pip uninstall torchaudio

pip install torch
pip install torchvision
pip install torchaudio

Image

Image

Image

Image

Image

Image

vldmr-d avatar Apr 23 '25 12:04 vldmr-d

The Solution's above did not work for me, and I am still getting the 'No Kernel Image' Error

HDmanic1 avatar May 30 '25 05:05 HDmanic1

The Solution's above did not work for me, and I am still getting the 'No Kernel Image' Error

this is what worked for me ... after hours of struggle and none of the online solutions working, i finally got this working. i'm on runpod for what it's worth and use a comfyui template built for rtx5090 with cu128 and python 3.12


pip install setuptools --upgrade pip install ninja cmake packaging

pip uninstall -y torch torchvision torchaudio xformers || true rm -rf ~/.cache/torch_extensions

pip install --force-reinstall torch==2.7.1+cu128 torchvision==0.22.1+cu128 --extra-index-url https://download.pytorch.org/whl/cu128

export TORCH_CUDA_ARCH_LIST="9.0"

OPTIONAL: Clean old installs

!pip uninstall -y flash-attn !rm -rf build dist *.egg-info

kat3ri avatar Jun 09 '25 14:06 kat3ri

I'm having the same issue. I setup the standalone on my laptop (GeForce 940mx), it older and the process time is slow, but it was working fine with maybe 12-15 min, but it was working and I'm using it to learn the basics while I build something better. It randomly stopped working after a system reboot.. I have started getting this no kernel error that I wasn't previously getting. I tried to delete and do a fresh install, I even formatted my hard drive and reinstalled windows and it's still giving the error. I even tried running a basic text to image template and once it gets to the ksampler it fails.

DangerZcs avatar Aug 17 '25 20:08 DangerZcs

I'm having the same issue. I setup the standalone on my laptop (GeForce 940mx), it older and the process time is slow, but it was working fine with maybe 12-15 min, but it was working and I'm using it to learn the basics while I build something better. It randomly stopped working after a system reboot.. I have started getting this no kernel error that I wasn't previously getting. I tried to delete and do a fresh install, I even formatted my hard drive and reinstalled windows and it's still giving the error. I even tried running a basic text to image template and once it gets to the ksampler it fails.

The error is not a Windows error so reinstalling the operating system was probably a bit much. I would recommend reinstalling CUDA and updating your GPU drivers. Also, because of the age of your GPU, make sure that you install a CUDA version that is compatible with your specific GPU - I suspect that is the cause of the error. In other words, make sure you CUDA version is compatible with your GPU and make sure you have installed PyTorch with the matching CUDA toolkit for your GPU. You can find the specifications for your GPU here: https://developer.nvidia.com/cuda-legacy-gpus

Also, I think newer versions of PyTorch have dropped support for older CUDA versions so it may be necessary to use something else, e.g. TensorFlow, which I have had success with in past - even with my older hardware

lucasmold avatar Aug 20 '25 22:08 lucasmold

I am on the brink of giving up and just uninstalling Comfy altogether. I get the same "CUDA error: no kernel image is available for execution on the device" message, but I have an old (ancient?) GTX970, not a new 50xx series card. Apparently, really old cards are as unsupported as really new ones.

None of the recommended instructions on removing/updating the "torch" files via Python work. Running the suggested command(s) from the CLI all result in errors. I apparently have a bunch of different copies of Python on my machine and the command hates them all.

The one place I don't have Python installed is my ComfyUI folder (or anyplace Comfy related.)

I just want to know is this is simply a matter of my card being too old, or is there a problem with my installation.

Mugsy323 avatar Sep 17 '25 20:09 Mugsy323

I am on the brink of giving up and just uninstalling Comfy altogether. I get the same "CUDA error: no kernel image is available for execution on the device" message, but I have an old (ancient?) GTX970, not a new 50xx series card. Apparently, really old cards are as unsupported as really new ones.

None of the recommended instructions on removing/updating the "torch" files via Python work. Running the suggested command(s) from the CLI all result in errors. I apparently have a bunch of different copies of Python on my machine and the command hates them all.

The one place I don't have Python installed is my ComfyUI folder (or anyplace Comfy related.)

I just want to know is this is simply a matter of my card being too old, or is there a problem with my installation.

For what it's worth: I have the exact same graphics grandma and the same problem, in my case trying to run ollama. Is there somewhere a compatibility table that tells me which version of CUDA is still compatible with my card?

Surrogard avatar Sep 26 '25 05:09 Surrogard

FOLLOW UP: I gave up on trying to get "Comfy UI" to work with my GTX970 GPU and instead reinstalled selecting the purely "CPU Mode" option. This works... kinda.

"CPU Mode" gives me limited working use of Comfy (where as nVidia mode refuses to run at all). I got the idea when a friend told me he was using an AMD Radeon GPU (so clearly, CUDA was not required.) I've found about a half-dozen static image Workflows that run successfully on my overclocked Ryzen 5800X cpu. But no video. Not a single video Workflow works. :(

I also had to dedicate an entire 500GB M2 drive to Comfy b/c the libraries ("Models") it must download to work are obscenely huge (this is true even in GPU Mode.)

And after all this, most of the results suck anyway. Very disappointing.

Mugsy323 avatar Sep 26 '25 11:09 Mugsy323

I have the same problem with an RTX 5060Ti 16GB,

jclaraf98 avatar Sep 29 '25 02:09 jclaraf98

FOLLOW UP: I gave up on trying to get "Comfy UI" to work with my GTX970 GPU and instead reinstalled selecting the purely "CPU Mode" option. This works... kinda.

"CPU Mode" gives me limited working use of Comfy (where as nVidia mode refuses to run at all). I got the idea when a friend told me he was using an AMD Radeon GPU (so clearly, CUDA was not required.) I've found about a half-dozen static image Workflows that run successfully on my overclocked Ryzen 5800X cpu. But no video. Not a single video Workflow works. :(

I also had to dedicate an entire 500GB M2 drive to Comfy b/c the libraries ("Models") it must download to work are obscenely huge (this is true even in GPU Mode.)

And after all this, most of the results suck anyway. Very disappointing.

I managed to get it running again by uninstalling cuda 13 and installing cuda 12.5. In AUR there are packages for fixed versions, but I guess they are also available elsewhere

Surrogard avatar Sep 29 '25 13:09 Surrogard

In my case, I migrated my setup from a 40-series GPU to a 50-series one. The sageattention2 module was originally built in the old environment, and I simply moved the entire Python environment over. I encountered the same issue as reported. My fix was to rebuild sageattention2 / sageattention3 directly in the new 50-series environment — after that, everything worked normally.

locke12456 avatar Oct 21 '25 04:10 locke12456

I use a 1080 GTX and been using comfy since august with no real issue like this, yesterday i installed some nodes and closed it down during installation by accident, when loading up it claimed my python needed a reinstall. I did this and then got this issue... redownloaded and reinstalled Comfyui and then spent all day on it, redownloaded GFX drivers, cuda kit everything i could think of... like literally all day! did everything online, updated the .venv only environment, went through everything co-pilot told me to do as a last resort...

This morning i fixed it, i made sure i only had Python 3.10.11 on my machine (not important i think but just in case as its last version to support my card) and then found my original install of ComfyUI (0.4.61) and tried that, the client auto updated to latest install (can see Flux 2 for example in templates) and it works now. So my guess is you need to use an old version of ComfyUI initially, i can confirm 0.4.61 works with 1070s and 1080 cards

MadMako22 avatar Nov 26 '25 07:11 MadMako22

Running into this on a 5070 ti after upgrading from a 3080 ti

fadingsignal avatar Dec 19 '25 12:12 fadingsignal

I found a solution from Reddit. I did this in the \python_embeded\ folder of ComfyUI and it works again.

https://www.reddit.com/r/StableDiffusion/comments/1j3ix0m/runtimeerror_cuda_error_no_kernel_image_is/

For those who keep getting the error even after uninstalling and reinstalling the correct version of PyTorch, make sure you're updating the application-specific python installation instead of your system-wide python installation.

I use Forge so the app-specific python.exe is in the directory: C:\pinokio\api\stable-diffusion-webui-forge.git\app\venv\Scripts. Right click in this folder and click Open in Terminal.

Run the following 2 commands in this directory:

.\python.exe -s -m pip install --pre --upgrade --no-cache-dir torch --extra-index-url https://download.pytorch.org/whl/nightly/cu128
 
.\python.exe -s -m pip install --pre --upgrade --no-cache-dir torchvision --extra-index-url https://download.pytorch.org/whl/nightly/cu128

That should update PyTorch in your app-specific python installation. Restart your AI image generation tool (Forge for me) and you should be good to go.

fadingsignal avatar Dec 19 '25 13:12 fadingsignal