LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download
No Module NamedComfyUI Dependency Conflicts: Fix Without ReinstallingTorch MissingTransformers MissingONNX MissingTriton MissingSageAttention MissingInsightFace MissingNunchaku MissingOpenCV / cv2 Missing
Missing Packages

No module named 'onnx' or 'onnxruntime' in ComfyUI

Partially verifiedMedium riskTested on Windows 10, Windows 11 | portable | Python 3.11 | CUDA 12.x | Torch 2.x | ComfyUI portable and manual venv patternsLast verified 2026-06-10Estimated time 5-20 minutes

Fix No module named 'onnx' or 'onnxruntime' errors in ComfyUI for WanVideoWrapper, DWPose, ReActor, IPAdapter FaceID, InstantID, and PuLID workflows.

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher

If you searched for ComfyUI no module named onnx WanVideoWrapper, No module named 'onnx', or No module named 'onnxruntime', first check whether the failing workflow actually uses ONNX-backed face, pose, or helper nodes.

For WanVideoWrapper, the warning often appears around FantasyPortrait or video-helper nodes. For most users, CPU onnxruntime is the safer first fix. Use GPU ONNX Runtime only when the workflow needs it and you can match the CUDA/cuDNN stack.

Symptoms

When ComfyUI starts, the terminal log shows warnings or errors like these:

WanVideoWrapper WARNING: FantasyPortrait nodes not available: No module named 'onnx'
No module named 'onnxruntime'
DWPose: Onnxruntime not found or doesn't come with acceleration providers, switch to OpenCV with CPU device

Cause

onnx is a model interchange library used to load .onnx model files. onnxruntime is the inference engine that runs those models. The two are often needed together, but not every workflow needs both.

Common ComfyUI custom nodes that may depend on ONNX or ONNX Runtime include:

  • ComfyUI-WanVideoWrapper - FantasyPortrait and related features
  • comfyui_controlnet_aux - DWPose pose detection
  • ComfyUI-ReActor - face swap through InsightFace / ONNX Runtime
  • ComfyUI_IPAdapter_plus - FaceID through InsightFace
  • ComfyUI_InstantID - identity-consistent face generation
  • ComfyUI-PuLID - face preservation

When these libraries are missing, nodes that depend on them may be unavailable, while ComfyUI itself and unrelated custom nodes can still work.

Severity

Medium - install these only if your workflow uses ONNX-backed pose, face, or helper models. If the warning is from an optional node family you do not use, it can be safely ignored.

Before installing: use the correct Python

Install typeCommand pattern
Official GitHub Windows portable packageFrom the portable package root: .\python_embeded\python.exe -s -m pip ...
Manual Git + venv installActivate the venv, then run python -m pip ...
ComfyUI Desktop or managed launcherUse the app's environment/terminal tools. Do not assume a portable python_embeded folder exists.

Plain pip install from a random terminal is the most common reason the error stays after installation.

Solutions

Option 1: Install the CPU version

This is the safest first choice for most users:

python -m pip install onnx onnxruntime

For the official Windows portable package:

.\python_embeded\python.exe -s -m pip install onnx onnxruntime

This is sufficient for many use cases. Features like DWPose can work in CPU mode, just slower.

Option 2: Install the GPU-accelerated version

If you have an NVIDIA GPU and the workflow benefits from ONNX Runtime GPU acceleration:

python -m pip install onnx onnxruntime-gpu

Do not keep both onnxruntime and onnxruntime-gpu installed at the same time. If you previously installed the CPU package, remove it first:

python -m pip uninstall onnxruntime -y
python -m pip install onnxruntime-gpu

Common installation issues

GPU not working after installing onnxruntime-gpu

Error message:

[W:onnxruntime:Default, onnxruntime_pybind_state.cc] LoadLibrary failed with error 126 when trying to load onnxruntime_providers_cuda.dll

Cause: The CUDA/cuDNN family required by onnxruntime-gpu does not match the runtime stack used by PyTorch.

ONNX Runtime's CUDA provider has different compatibility groups. Current CUDA 12.x ONNX Runtime packages use cuDNN 9.x and are compatible with newer PyTorch CUDA 12.x stacks, while older PyTorch builds may need older ONNX Runtime GPU versions.

Safer fix: Use CPU onnxruntime unless the workflow is clearly bottlenecked by ONNX inference. If you need GPU acceleration, match ONNX Runtime GPU to your PyTorch CUDA/cuDNN family instead of installing the latest package blindly.

Both onnxruntime and onnxruntime-gpu installed

Symptom: GPU inference fails to activate, or behavior becomes inconsistent.

Check what is installed:

python -m pip list | findstr onnxruntime

If both are present, keep only the version you need:

python -m pip uninstall onnxruntime onnxruntime-gpu -y
python -m pip install onnxruntime

or, for GPU:

python -m pip uninstall onnxruntime onnxruntime-gpu -y
python -m pip install onnxruntime-gpu

protobuf version conflict

Error message:

TypeError: Descriptors cannot be created directly.

Solution: Quote the requirement so shells do not interpret > as redirection:

python -m pip install "protobuf>=3.20"

Verify the installation

python -c "import onnxruntime as ort; print(ort.__version__, ort.get_available_providers())"

If GPU acceleration is working, CUDAExecutionProvider should appear in the provider list. If only CPUExecutionProvider appears, the CPU package is installed or the GPU provider did not load.

Still not resolved?

If you encounter other errors during installation, collect the full terminal message plus:

  • output of python --version
  • output of python -c "import torch; print(torch.__version__, torch.version.cuda)"
  • output of python -c "import onnxruntime as ort; print(ort.__version__, ort.get_available_providers())"

Then use expert help if you need the fastest recovery path.

Source References

  • ComfyUI troubleshooting overview
  • ComfyUI custom node troubleshooting guide
  • ComfyUI model troubleshooting guide
  • ONNX Runtime installation documentation

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher
Related guides:Start from the No module named hubFix InsightFace workflowsRepair dependency conflicts

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Transformers Missing

Fix ComfyUI No module named transformers errors in the active Python environment and understand when the failure comes from ComfyUI's core text stack.

Triton Missing

Fix ModuleNotFoundError: No module named 'triton' in ComfyUI by separating harmless comfy_kitchen logs from blocking workflow or SageAttention failures.

Table of Contents

Symptoms
Cause
Severity
Before installing: use the correct Python
Solutions
Option 1: Install the CPU version
Option 2: Install the GPU-accelerated version
Common installation issues
GPU not working after installing onnxruntime-gpu
Both onnxruntime and onnxruntime-gpu installed
protobuf version conflict
Verify the installation
Still not resolved?
Source References