Skip to content
,

ComfyUI Import Failed and Missing Nodes: How to Fix Every Common Error (2026)

9–13 minutes
Woman in an art studio holding a card reading NODES, hook red nodes here's the fix

You load a workflow and half the graph turns red. Or you install a node pack, restart, and the startup log says (IMPORT FAILED) next to its name. Both problems look alike, but they have different causes and different fixes.

This guide explains how to tell “missing nodes” from “import failed”, how to read the log to find the real error, and step-by-step fixes for every common traceback: missing Python modules, NumPy 2 clashes, OpenCV conflicts, packs that are too old for your ComfyUI, wrong folder names and Manager security blocks. Commands are given for ComfyUI Portable, Desktop and manual installs.

TL;DR

  • Red nodes, no error at startup: the pack is not installed. Use the missing nodes prompt or Manager, then restart.
  • “(IMPORT FAILED)” in the startup list: the pack is installed but crashed while loading. Scroll up to its first traceback; the last line names the cause.
  • Most common fix: install the pack’s requirements into ComfyUI’s own Python, e.g. .\python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\PACK\requirements.txt.
  • NumPy error: pip install "numpy>=1.26,<2" only if a pack still needs NumPy 1.x; updating the pack is better.
  • Can’t find the culprit: start with --disable-all-custom-nodes, then bisect with comfy-cli node bisect.
  • Always fully restart ComfyUI after a change. A browser refresh does not reload Python code.

New to ComfyUI? My ComfyUI beginner guide covers install, models, nodes and fixes in one place.

Missing Nodes vs Import Failed

What you see What it means Fix
Red nodes and a “missing nodes” prompt when you load a workflow, nothing odd in the startup log The node pack is not installed Install missing nodes
(IMPORT FAILED) next to a pack in the “Import times for custom nodes” list The pack is in custom_nodes but crashed while loading, so its nodes do not exist Read the traceback
Nodes still red after installing the pack Usually an import failure that you have not spotted yet, or the workflow needs a newer version Installed but still red

When ComfyUI starts, it prints a list headed Import times for custom nodes. Each line shows the load time and the pack folder. A healthy pack looks like 0.3 seconds: ...\custom_nodes\ComfyUI-KJNodes. A broken one shows 0.0 seconds (IMPORT FAILED): .... That list is the first place to look.

Fix 1: Install Missing Nodes

Current ComfyUI has the Manager built in (start with --enable-manager; Desktop does this for you). If you do not have it yet, follow my ComfyUI Manager install guide.

  1. Load the workflow. A prompt lists the missing node types.
  2. Click Install All, or open the Manager to check each pack first. You can also select a red node and click Missing in the preview panel.
  3. Restart ComfyUI fully (close the console window or Desktop app and start again), then refresh the browser tab.
  4. Check the startup log. If the new pack shows (IMPORT FAILED), go to Fix 2.

If the Manager cannot find a node, search its name on the ComfyUI Registry or on GitHub, and install it by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/AUTHOR/PACK-NAME
cd PACK-NAME
# then install requirements with ComfyUI's Python (see the next sections)

Safety first: custom nodes run Python code on your PC with full access. Install packs from known authors with public repos, and be careful with unknown packs that come bundled with random workflows. Even popular packs can have security bugs, like the recent ComfyUI-Easy-Use vulnerability, so keep them updated.

Fix 2: Read the Import Failed Traceback

  1. Find the (IMPORT FAILED) line in the startup output and note the pack folder name.
  2. Scroll up to the block that starts with Traceback (most recent call last): and mentions that folder. It usually appears above the import list, right before a line that says “Cannot import … module for custom nodes”.
  3. Read the last line of that traceback. It names the real problem, for example ModuleNotFoundError: No module named 'insightface'.
  4. Match it to the table in Common Tracebacks below.

If the console closed or scrolled too far, ComfyUI Desktop and newer frontends also show the server output in the Logs panel at the bottom of the window. On Portable, you can start ComfyUI from a terminal so the window stays open after a crash.

Use the Right Python (Portable, Desktop, Manual)

The number one reason a fix “does nothing” is that the package went into the wrong Python. ComfyUI does not use your system Python unless you set it up that way.

Install type Python to use Example
Windows Portable python_embeded\python.exe (run from the portable folder) .\python_embeded\python.exe -m pip install insightface
ComfyUI Desktop .venv inside your Desktop base folder .\.venv\Scripts\python.exe -m pip install insightface
Manual (venv) Activate the venv first source venv/bin/activate then python -m pip install insightface
Manual (conda) Activate the conda env conda activate comfy then python -m pip install insightface

To install a whole pack’s requirements on Portable:

.\python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\PACK-NAME\requirements.txt

Some packs also ship an install.py. If the README says to run it, use the same Python: .\python_embeded\python.exe ComfyUI\custom_nodes\PACK-NAME\install.py.

Common Tracebacks and Their Fixes

ModuleNotFoundError: No module named ‘X’

A Python package the pack needs is not installed. Install the pack’s requirements.txt as shown above, or the single module named in the error. Note that the import name and the pip name are sometimes different:

Error says Install with pip
No module named 'cv2' opencv-python (or opencv-contrib-python if the pack asks for it)
No module named 'PIL' pillow
No module named 'skimage' scikit-image
No module named 'sklearn' scikit-learn
No module named 'yaml' pyyaml
No module named 'git' gitpython

“A module that was compiled using NumPy 1.x cannot be run in NumPy 2.x”

Some older packages were built against NumPy 1. First, update the pack and ComfyUI, since most packs now support NumPy 2. If one pack still needs NumPy 1, check what conflicts with pip check, then pin NumPy:

.\python_embeded\python.exe -m pip check
.\python_embeded\python.exe -m pip install "numpy>=1.26,<2"

Old pins like numpy==1.23.5 do not build on Python 3.12 and newer. Be aware that pinning NumPy 1 can break other packs that need NumPy 2, so treat it as a last resort.

OpenCV clashes (cv2 errors after installing a second pack)

opencv-python, opencv-contrib-python and the -headless versions all provide the same cv2 module. Having several installed at once can break it. Keep just one:

.\python_embeded\python.exe -m pip uninstall -y opencv-python opencv-python-headless opencv-contrib-python opencv-contrib-python-headless
.\python_embeded\python.exe -m pip install opencv-contrib-python

The contrib build includes everything the basic one has, so it usually satisfies both packs.

ImportError: cannot import name ‘X’ from ‘comfy…’

The pack and your ComfyUI do not match. Either the pack is old and ComfyUI moved that function, or the pack is newer than your ComfyUI.

Update both: ComfyUI first (see how to update ComfyUI), then the pack (Manager’s Update, or git pull in the pack folder). If the pack is abandoned, look for a maintained fork or alternative on the Registry.

Building wheel failed / Microsoft Visual C++ 14.0 is required

A package (often insightface) has no ready-made wheel for your Python version, so pip tries to compile it. Look for a pre-built wheel that matches your Python (Portable ships Python 3.13), or install the Visual Studio Build Tools with the “Desktop development with C++” workload, then retry.

AssertionError: Torch not compiled with CUDA enabled

A pack’s requirements replaced your GPU build of PyTorch with a CPU build. Follow my Torch not compiled with CUDA enabled fix.

No error at all, but the pack does not load

Check the folder. The pack must sit directly in ComfyUI/custom_nodes/PACK-NAME/ with its __init__.py inside. A ZIP download often creates a double folder like PACK-NAME/PACK-NAME/, which ComfyUI cannot import. A PACK-NAME-main folder usually loads, but the Manager cannot update it. Also make sure the folder is not disabled (Manager moves disabled packs to custom_nodes/.disabled).

“This action is not allowed with this security level”

This is the Manager blocking a risky install (git URL or pip). It is not an import error, but it stops the pack from installing. See my ComfyUI security level guide for safe settings.

Find a Broken Pack: Disable and Bisect

When ComfyUI misbehaves and you do not know which pack is to blame, the official approach is to switch all custom nodes off, then narrow it down.

  1. Start with all custom nodes disabled:
    • Manual: python main.py --disable-all-custom-nodes
    • Portable: .\python_embeded\python.exe -s ComfyUI\main.py --disable-all-custom-nodes --windows-standalone-build
    • Desktop: start with custom nodes disabled from the settings menu.

    If the problem is gone, a custom node is the cause.

  2. Bisect with comfy-cli (it enables and disables packs for you):
    comfy-cli node bisect start
    comfy-cli node bisect good    # problem gone in this round
    comfy-cli node bisect bad     # problem still there
    comfy-cli node bisect reset   # when finished
  3. Or bisect by hand: back up custom_nodes, move half the packs into a custom_nodes_temp folder, restart, and keep halving the suspect group until one pack is left.

Once you know the pack: update it, replace it with a similar one from the Registry, report the bug on its GitHub page (include your ComfyUI version, OS, the traceback and steps), or remove it.

Installed but Still Red

  • You did not restart fully. Close the server, start it again, then refresh the browser.
  • The pack failed to import. Check the startup list for (IMPORT FAILED).
  • The workflow needs a newer pack version. Node names change between releases. Update the pack, or pick a specific version in the Manager.
  • Two packs define the same node name. The Manager marks conflicts. Disable the one you need less.
  • The node moved into ComfyUI core. Some popular nodes became built-in. Update ComfyUI and search the node name in the node library.
  • The nodes load but models are missing. That is a different error (“Value not in list”). Check my ComfyUI model folder cheat sheet.

Prevent Import Errors

  • Snapshot before big changes. The Manager can save a snapshot of your install and restore it.
  • Preview installs: pip install -r requirements.txt --dry-run shows what would change, including torch or NumPy swaps.
  • Keep fewer packs. Every pack adds dependencies. Remove ones you no longer use. My must-have custom nodes list covers the reliable ones.
  • Update ComfyUI and packs together, not months apart.
  • Use a second install for testing big or experimental packs.

Quick Troubleshooting Table

Symptom Fix
Red nodes, prompt lists missing types Install All in the missing nodes prompt, then restart
(IMPORT FAILED) in startup list Read the traceback’s last line and fix that
ModuleNotFoundError Install requirements with ComfyUI’s own Python
Fix “did nothing” You used the wrong Python. Use python_embeded or the Desktop .venv
NumPy 1.x vs 2.x error Update the pack; pin numpy>=1.26,<2 only as a last resort
cv2 errors after a new pack Uninstall all OpenCV variants, install one
cannot import name ... from comfy Update ComfyUI and the pack
Visual C++ / wheel build failed Use a pre-built wheel for your Python or install Build Tools
Torch not compiled with CUDA Reinstall the CUDA PyTorch build
Pack folder ends in -main or is nested Rename or move it to custom_nodes/PACK-NAME
Manager says not allowed by security level Adjust the security level briefly, then set it back
Unknown pack breaks ComfyUI --disable-all-custom-nodes, then bisect

For errors that are not about custom nodes, see my full list of ComfyUI errors and fixes.

FAQ

Why does ComfyUI say IMPORT FAILED even though I installed the node?

Installing only copies the files. Import failed means the pack’s Python code crashed when ComfyUI loaded it, usually because a dependency is missing or the wrong version.

Does “Try Fix” in the Manager help?

It reinstalls the pack’s dependencies, which is the same as running its requirements file. It can fix missing modules, but it will not solve version conflicts between two packs. Depending on your security level, the Manager may block it.

Is it safe to delete a custom node folder?

Yes. Close ComfyUI and delete the folder in custom_nodes. Workflows that used its nodes will show them as missing. The Python packages it installed stay, but they are harmless.

Should I use Python 3.12 or 3.13?

ComfyUI’s README calls 3.13 the best supported version, with 3.12 as a fallback when a custom node’s dependencies do not support 3.13 yet. 3.14 works, but some custom nodes may have issues.

Can one bad pack break all my other nodes?

Yes. A pack can downgrade a shared library (NumPy, OpenCV, torch) for everyone. That is why you check the startup list after every install.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in an art studio holding a card reading NODES, hook red nodes here's the fix