⚠️ Dependency Troubleshooting Guide

How to Fix "No module named onnxruntime" in ComfyUI

Configure ONNX Runtime GPU support with correct CUDA and cuDNN versions.

Error Signature:ModuleNotFoundError: No module named 'onnxruntime'

⚡ Quick Direct Answer

Install onnxruntime-gpu into your portable or active virtual environment.

Why Does This Error Happen?

Face detection, depth estimation, or segmentation nodes (such as RMBG, ControlNet preprocessors, or ReActor) require the ONNX Runtime inference engine.

Recommended Terminal Repair Commands

Windows (ComfyUI Portable):
.\python_embeded\python.exe -m pip install onnxruntime-gpu
Linux / macOS (Virtualenv):
pip install onnxruntime-gpu

Still Crashing on Your Local GPU?

Skip compilation conflicts and memory limits by deploying on high-VRAM Cloud GPUs starting at pennies/hour.

Frequently Asked Questions

Should I install onnxruntime or onnxruntime-gpu?

Always install onnxruntime-gpu on systems with NVIDIA graphics cards. If both packages are installed concurrently, they conflict; uninstall onnxruntime first, then install onnxruntime-gpu.