The message
UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider'
Why is this happening?
onnxruntime is available as a CPU package onnxruntime and as a GPU package onnxruntime-gpu. Only one of them may be installed at a time. If both are present, CUDA is missing from the list and onnxruntime falls back to the CPU. In addition, onnxruntime-gpu needs the matching CUDA (12.x or 13) and cuDNN 9 version that it can use together with PyTorch.
How to fix it
- Check what onnxruntime sees. Portable: open a terminal in the
ComfyUI_windows_portablefolder and run.\python_embeded\python.exe -c "import onnxruntime as ort; print(ort.get_available_providers())". IfCUDAExecutionProvideris missing, everything is running on the CPU. - Check which packages are installed:
.\python_embeded\python.exe -m pip listand look foronnxruntimeandonnxruntime-gpu. - Remove both and install only the GPU version:
.\python_embeded\python.exe -m pip uninstall -y onnxruntime onnxruntime-gpuand then.\python_embeded\python.exe -m pip install onnxruntime-gpu. In a venv, use the same commands withpipafter activation. - If CUDA is still missing, install the CUDA and cuDNN libraries through pip as well:
pip install onnxruntime-gpu[cuda,cudnn]. In your own scripts, runimport torchbefore starting or callonnxruntime.preload_dlls()so the libraries are loaded. - For rembg:
pip install "rembg[gpu]"(with command line"rembg[gpu,cli]"). If the GPU version does not work, use"rembg[cpu]". - For ReActor in ComfyUI: run
install.batin theComfyUI\custom_nodes\ComfyUI-ReActorfolder; it sets up the GPU version of onnxruntime for ComfyUI's Python.
Better not: Never install onnxruntime and onnxruntime-gpu in the same environment at the same time.
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
- RuntimeError: CUDA error: an illegal memory access was encountered – the graphics card accessed invalid memory
- hipErrorNoBinaryForGpu: Unable to find code object for all current devices! (ROCm has no matching code for your AMD card)
- No module named 'triton' on Windows (triton-windows missing)
- A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x – a package does not match the installed NumPy version
- module 'torch' has no attribute 'float8_e4m3fn' (PyTorch too old for fp8)
Sources
- https://github.com/microsoft/onnxruntime/issues/23736
- https://github.com/microsoft/onnxruntime/issues/26996
- https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html
- https://github.com/danielgatis/rembg
Checked on Oct 27, 2026. Didn't help? Ask in the forum and name the graphics card, program, and the full message.