ComfyUI Dependency Conflicts: Fix Without Reinstalling
Fix ComfyUI dependency conflicts after custom node installs, Torch downgrades, pip clashes, broken plugin imports, or package pins like sensevoice-onnx and setuptools.
Tested Environment
- OS: Windows 10 / 11
- Launcher: Wonderful Launcher v1.x
- ComfyUI: Portable / Managed install
- Python: 3.11+
- CUDA / Torch: CUDA 12.x / Torch 2.x
- Last tested: 2026-05-19
A dependency conflict is when one plugin, package, or wheel changes a shared dependency (PyTorch, NumPy, OpenCV, a Hugging Face package) in a way that breaks another plugin, the runtime, or your workflows. Do not reinstall first. Identify which plugin import or package change broke the environment, then repair the smallest possible layer.
If your exact pip check line is sensevoice-onnx requires setuptools<=65.0, use the dedicated SenseVoice-ONNX setuptools conflict guide.
Evidence Note
This guide combines official ComfyUI troubleshooting commands with operator guidance for minimizing damage in a shared Python environment. The conflict categories here are practical repair patterns, not an official ComfyUI error taxonomy.
First, confirm the layer
Many "dependency conflict" sessions are really one layer earlier or later than a package conflict. Route before running install commands:
| First visible symptom | Treat it as | Best next page |
|---|---|---|
| Workflow opens with red or missing nodes | Missing node / plugin install | Workflow missing nodes |
Startup log says IMPORT FAILED for a custom node | Plugin import failure | Plugin import failed |
ModuleNotFoundError: No module named ... | Missing package or wrong package name | No module named errors |
pip check reports incompatible package requirements | Real dependency conflict | Continue on this page |
/system_stats shows CPU-only Torch or CUDA unavailable | Core Torch runtime break | Torch CUDA repair |
| Red nodes fixed but checkpoint/LoRA/VAE/CLIP files missing | Missing model file | Cannot find model file |
Only continue here when the failure is in the shared Python package stack.
Frequent conflict signatures
Users often search the exact package name from pip check. A pip check line is a clue, not automatically a command — first confirm whether ComfyUI fails, which plugin failed to import, and whether the workflow you need actually uses that package.
| Exact signature | Why it happens | Safer next move |
|---|---|---|
qwen-tts requires transformers==... | A voice/Qwen-TTS workflow pins a narrow Transformers version | Do not change the whole Hugging Face stack until you know that workflow matters |
mediapipe requires numpy<2 | MediaPipe pose/face helpers conflict with newer NumPy | Avoid a global NumPy downgrade unless MediaPipe is a hard blocker |
sensevoice-onnx requires setuptools<=65.0 | An older audio/speech package expects an old packaging stack | Treat as a workflow-specific repair, not a reason to downgrade every environment |
torchscale requires timm==... | An older vision stack conflicts with newer timm | Check which plugin needs TorchScale before pinning timm |
protobuf conflict / Descriptors cannot be created directly | ONNX/TensorFlow/generated files disagree on protobuf | Use the ONNX page for the narrow repair |
opencv-python-headless vs opencv-python | Multiple OpenCV flavors fighting over cv2 | Keep one OpenCV flavor only |
pip install mmcv exited with code 1 | Wheel/build does not match Python/Torch/CUDA | Use the MMCV-specific repair path before broad upgrades |
Before you install anything else
- Record the exact error from the startup terminal.
- Record which plugin or requirement you installed last.
- Confirm which Python actually launches ComfyUI.
- Decide whether the failure is a core runtime break, a plugin import break, or a harmless declaration warning.
Step 1: Diagnose
Check for import failures in the startup log:
IMPORT FAILED: ComfyUI-ExampleNode
ModuleNotFoundError: No module named 'somepackage'Run pip check in the same Python that starts ComfyUI:
| Install type | Safer command |
|---|---|
| Official GitHub Windows portable package | From the portable package root: .\python_embeded\python.exe -s -m pip check |
| Manual Git + venv install | Activate the venv, then run python -m pip check |
| ComfyUI Desktop or managed launcher | Use the app's environment/terminal tools. Do not assume a portable python_embeded folder exists. |
Example output:
some-plugin 1.0 requires numpy<2, but you have numpy 2.4.4
another-package 2.0 requires pillow<11, but you have pillow 12.2.0Check Manager's failure info: if ComfyUI is running, visit http://127.0.0.1:8188/v2/customnode/import_fail_info_bulk for a JSON list of import failures.
Step 2: Classify before installing anything
- Hard blockers (fix first):
torchmismatch or CPU-only Torch (see Torch CUDA repair); a missing package a needed plugin directly imports; a native wheel failure likeDLL load failed while importing cv2; two required plugins needing non-overlapping versions. - Soft drift (monitor):
pip checkreports a declaration mismatch but ComfyUI starts, the plugin imports, and the workflow runs; a package only used by a feature you never use; an optional acceleration backend missing where the node has a PyTorch fallback. Rule of thumb: if ComfyUI starts, the plugin registers, and your workflow runs, do not "fix" the warning just to makepip checklook pretty. - Declaration errors: typos (
librosvslibrosa), broad pins that downgrade core packages, optional packages listed as mandatory, or Linux-correct pins that are wrong on Windows. Document the workaround; do not edit random plugin source as the first response.
Step 3: Fix
Protect your core runtime. These must not be changed accidentally by a plugin install: torch/torchvision/torchaudio, numpy, pillow, opencv-python/opencv-python-headless, transformers/diffusers/huggingface-hub. Preview what an install will change first:
python -m pip install -r requirements.txt --dry-runIf the dry run wants to replace Torch, NumPy, Pillow, OpenCV, or the Hugging Face stack, stop and decide whether that plugin really needs those changes.
Use the correct Python.
| Install type | Safer pattern |
|---|---|
| Official GitHub Windows portable package | .\python_embeded\python.exe -s -m pip install <package-or-wheel> from the portable package root |
| Manual Git + venv install | Activate the venv, then use python -m pip install <package-or-wheel> |
| ComfyUI Desktop or managed launcher | Use the app's environment/terminal tooling |
Use minimal fixes. Do not broad-upgrade a shared stack (python -m pip install -U transformers diffusers huggingface-hub) just because one plugin failed. Prefer the narrow fix tied to the exact failing import, or the plugin author's tested compatibility table.
Use the correct package name — some errors are package-name traps:
| Error | Practical note |
|---|---|
No module named 'nunchaku' | Install the ComfyUI/Nunchaku backend from Nunchaku's documented wheels, not the unrelated nunchaku PyPI package. See Nunchaku Missing. |
No module named 'triton' on Windows | Do not use the normal upstream triton path. See Triton Missing or Unavailable. |
No module named 'sageattention' | Decide whether it is optional acceleration or a fatal requirement before installing CUDA packages. See SageAttention Missing. |
pip install mmcv exited with code 1 | MMCV must match the OpenMMLab/PyTorch/CUDA/Python stack. See MMCV Install Failed. |
Use pre-built wheels for native packages (nunchaku, insightface, some attention kernels): match the Python tag (cp312), PyTorch version if tied to Torch, CUDA version if the package includes CUDA kernels, and Windows architecture (win_amd64).
What usually makes conflicts worse
- reinstalling random packages from old Reddit or Discord messages
- using plain
pip installagainst the wrong Python - letting a plugin downgrade Torch without noticing
- upgrading
numpy,opencv,transformers, ordiffusersas a group without checking impact - fixing a Windows Triton error with the normal upstream
tritonpackage - treating every
pip checkwarning like a production outage
Common conflict recipes
- Hugging Face stack drift —
diffusers,transformers,huggingface-hub, andaccelerateneed a compatible set. Check the plugin README or error log, then install the smallest compatible set. - NumPy 2.x vs 1.x — do not globally downgrade NumPy from an old guide. Confirm a real NumPy error from the plugin you need first; if it truly requires 1.x, isolate that workflow.
- OpenCV conflicts — keep one flavor;
opencv-python-headlessis the safer default. See OpenCV (cv2) Missing. - Nunchaku wheel mismatch — use Nunchaku's install workflow or a wheel matching your exact environment; fix the
ComfyUI-nunchakuimport before installing a package named after a node. See Nunchaku Missing. - MMCV build/wheel failure — decide whether the plugin needs full MMCV CUDA ops or only
mmcv-lite. See MMCV Install Failed. - ONNX Runtime GPU mismatch — CPU
onnxruntimeis enough for many pose/face helpers; only install GPU ONNX Runtime when you can match the CUDA/cuDNN family. See ONNX / ONNXRuntime Missing.
Recovery: when your environment is broken
- Record the current Python path, ComfyUI version, PyTorch/CUDA versions, and the last plugin installed.
- Restore Torch using the Torch CUDA repair guide.
- Repair ComfyUI's own requirements in the same environment.
- Restart and confirm
/system_statsworks. - Add plugin repairs one at a time, checking
IMPORT FAILEDafter each change.
For the official Windows portable package, run commands from the extracted portable root, not from inside the ComfyUI subfolder. If PyTorch and CUDA still work but core packages are missing, use Repair Broken ComfyUI Portable Dependencies before broad commands that may replace the GPU stack.
Before marking the repair finished, verify the same ComfyUI process:
| Verification | Why it matters |
|---|---|
pip check in the active ComfyUI Python | Confirms you did not check the wrong Python install |
Startup log has no new IMPORT FAILED for the target plugin | Confirms the backend node classes registered |
/system_stats still reports the expected CUDA/Torch runtime | Confirms a package repair did not replace GPU Torch |
| The workflow queues past the original node | Confirms the fix reached the user-visible problem |
If verification exposes a new missing model, switch to the model-placement path instead of changing more packages.
When to split environments
Consider separate environments when one old plugin and one new plugin require non-overlapping versions, one workflow needs legacy NumPy/OpenCV pins while another needs newer model stacks, or a video/acceleration plugin keeps forcing core runtime changes. If the environment is too damaged to recover, keep a copy of workflows, models, and custom_nodes, re-extract from the Portable Package or Desktop installer, then reinstall plugins one at a time (see Custom Nodes).
FAQ
Should I reinstall ComfyUI right away?
Usually no. First identify whether the break is in Torch, a plugin import, a native wheel, or only a version declaration mismatch.
What command should I run first?
Run pip check in the same Python that launches ComfyUI, then compare it with the actual IMPORT FAILED lines in the startup log.
Why did one custom node break unrelated workflows?
Many plugins share the same Python environment and package stack. A change meant for one node can replace core packages used by many others.
Related Guides
- Repair Broken ComfyUI Portable Dependencies Without Reinstalling Torch
- ComfyUI No Module Named 'sageattention'
- ComfyUI Triton Missing or Unavailable
- ComfyUI Nunchaku Missing
- ComfyUI MMCV Install Failed
- ComfyUI Torch Not Compiled With CUDA Enabled
- Plugin Management
- Troubleshooting Decision Tree
- Common Issues
Source References
Start free with Wonderful Launcher if this affects your real ComfyUI environment. It keeps launcher-native repair, task logs, and runtime checks in one place; credits are only for image generation and metered tools.
Download Wonderful LauncherSee credit packagesDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.