ComfyUI Plugin Import Failed: Fix Custom Node Errors
Fix ComfyUI plugin import failed errors, broken custom node imports, red workflow nodes, and dependency drift without reinstalling your environment.
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
If the startup log shows IMPORT FAILED, a custom node was downloaded but the Python process that starts ComfyUI could not import it. Identify the exact plugin and traceback first, fix the earliest import failure (not the red node you noticed later), and install packages only in the Python environment that launches ComfyUI. This is a dependency or packaging problem first — not proof that all of ComfyUI is broken.
If the visible error is different, use the matching guide instead: Failed to Save Workflow Draft → save the workflow JSON first; failed to fetch server logs → Failed to Fetch Server Logs; Manager failed to get custom node list → Failed to Get Custom Node List.
Typical log lines:
IMPORT FAILED: ComfyUI-ExampleNode
ModuleNotFoundError: No module named 'somepackage'IMPORT FAILED: ComfyUI-AnotherNode
ImportError: DLL load failed while importing cv2IMPORT FAILED: ComfyUI-SomePlugin
AttributeError: module 'torch' has no attribute '...'Separate three symptoms that get mixed together
| Symptom | What it usually means |
|---|---|
| Red node in a workflow | The workflow asks for a node class that is not registered |
IMPORT FAILED during startup | A plugin folder exists, but Python could not import it |
| Error only when queueing a prompt | The node exists, but runtime inputs, models, CUDA, or a backend failed |
Fix the earliest failing layer first. Installing packages for a runtime error will not help if the plugin never registered its nodes.
Triage: package-specific routes
If the traceback names one of these, use the narrow guide before running broad plugin requirements:
| Log clue | Usually affects | Safer next guide |
|---|---|---|
No module named 'insightface' | ReActor, InstantID, IPAdapter FaceID | InsightFace Missing |
No module named 'onnx' or onnxruntime | DWPose, ReActor, ONNX inference | ONNX / ONNXRuntime Missing |
No module named 'gguf' | ComfyUI-GGUF loader nodes | ComfyUI-GGUF |
No module named 'triton' | SageAttention, compiled kernels, some video workflows | Triton Missing or Unavailable |
No module named 'sageattention' | Optional acceleration or video workflows | SageAttention Missing |
No module named 'llama_cpp' | QwenVL GGUF, local LLM/VLM, prompt enhancers | llama_cpp missing |
No module named 'nunchaku' | Nunchaku FLUX, Qwen-Image, SVDQuant | Nunchaku Missing |
Torch not compiled with CUDA enabled | GPU PyTorch build replaced or inactive | Torch CUDA repair |
AttributeError against ComfyUI internals | Plugin source no longer matches your ComfyUI version | Update plugin or patch source, not packages |
| Easy Use, Layer Style, rgthree, VideoHelperSuite import failed | Popular pack installed but not loading | Popular custom node packs |
Step 1: Confirm which plugin actually failed
Do not start by installing random packages. Answer: which plugin failed, and what error type stopped the import? Check in order:
- Startup log: find
IMPORT FAILEDand copy the full traceback. - Import failure API: if the UI opens, visit
http://127.0.0.1:8188/v2/customnode/import_fail_info_bulkfor a JSON list of failures. - Workflow symptoms: note whether one plugin family is missing, multiple unrelated plugins are missing, or a plugin worked before another install changed the environment.
Step 2: Classify the failure before you fix it
- Missing package (
ModuleNotFoundError: No module named 'onnxruntime') — the plugin expects a package that is not installed. - Broken binary package (
ImportError: DLL load failed while importing cv2) — the wheel does not match your Python, CUDA, or Windows runtime. - Core dependency drift (
AttributeError: module 'torch' has no attribute '...') — another plugin install changedtorch,numpy,pillow, oropencv-python. - Repo or source problem — the repo moved, cloned partially, left Git LFS pointers, or is too old for your ComfyUI version.
Before any install command, check: did the plugin ever work here; is the folder present but broken or completely missing; did another plugin install happen right before this started failing.
Step 3: Repair with the narrowest fix
If a package is missing, install it in the 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 install somepackage |
| Manual Git + venv install | Activate the venv, then run python -m pip install somepackage |
| ComfyUI Desktop or managed launcher | Use the app's environment/terminal tools. Do not assume the portable python_embeded layout exists. |
If you suspect dependency drift, run pip check and look for conflicts around torch, torchvision, torchaudio, numpy, pillow, opencv-python, transformers, diffusers. Repair the core package first, then retest. See ComfyUI Dependency Conflicts.
If the plugin itself is outdated or partially broken, verify the repo is correct, the source files are real code (not Git LFS pointers), and the plugin still supports your ComfyUI version. If needed, cd custom_nodes/<plugin-name> and git pull, then reinstall only that plugin's requirements:
Do not run pip install -r requirements.txt blindly.
- Confirm which Python environment is active (
where pythonorwhich python) - Inspect
requirements.txt— check if it pins torch, numpy, or opencv versions - Install only the missing package when possible:
pip install <package-name> - Run
pip checkafter installation to verify no conflicts were introduced
For the official Windows portable package, run from the portable root with .\python_embeded\python.exe -s -m pip install -r .\ComfyUI\custom_nodes\<plugin-name>\requirements.txt.
Verification ladder
A plugin folder, a successful clone, or an offline Python import is not the same as a working ComfyUI node. Confirm each rung before calling the repair done:
| Verified state | What it proves | What it does not prove yet |
|---|---|---|
| Plugin folder exists | Files are present under custom_nodes/ | The plugin imported successfully |
python -c "import package" works | One package imports offline | ComfyUI used the same Python or registered the node |
Startup log has no IMPORT FAILED for the plugin | The import got past startup | The workflow has all model files and runtime inputs |
/v2/customnode/import_fail_info_bulk is clean for that plugin | No recorded import failure | The workflow will execute without model/CUDA/input errors |
| Red nodes are gone after restart | Node classes registered | Model files and runtime backends may still be missing |
If nodes now register but the workflow asks for model files, switch to model placement or cannot find model instead of reinstalling the plugin.
When this is really a dependency-conflict problem
If one plugin import failure turns into several unrelated plugin failures after a package install, switch to:
Related guides
- ComfyUI Startup Failed? How to Diagnose and Recover Faster
- ComfyUI Dependency Conflicts
- ComfyUI No Module Named Error: When It Is Safe to Ignore
- ComfyUI No Module Named 'llama_cpp'
- ComfyUI Plugin Management
- Popular ComfyUI Custom Node Packs
- Troubleshooting Decision Tree
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.