ModuleNotFoundError: No module named 'spandrel' in ComfyUI
Fix ComfyUI No module named spandrel errors when upscale model nodes fail to import from nodes_upscale_model.py.
If ComfyUI logs ModuleNotFoundError: No module named 'spandrel', upscale model nodes may fail to import even when the main server starts.
In the SEO Lab portable repair, spandrel was missing from comfy_extras\nodes_upscale_model.py. Installing the package restored that built-in extra node path and increased the registered node count.
Fast answer
For the GitHub Windows portable package:
.\python_embeded\python.exe -s -m pip show spandrel
.\python_embeded\python.exe -s -m pip install spandrel
.\python_embeded\python.exe -s -c "import spandrel; print('import ok')"
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-buildThen check whether nodes_upscale_model.py imports cleanly.
What The Log Looks Like
The tested lab showed this pattern:
ModuleNotFoundError: No module named 'spandrel'
Cannot import ...\ComfyUI\comfy_extras\nodes_upscale_model.py module for custom nodes: No module named 'spandrel'
IMPORT FAILED: nodes_upscale_model.pyThis is a node-registration problem. It is not the same as a missing .pth or .safetensors upscale model file.
Quick Diagnosis
| What You See | Meaning | First Action |
|---|---|---|
No module named 'spandrel' from nodes_upscale_model.py | Upscale model node dependency is missing | Install spandrel in ComfyUI's Python |
| Upscale model files exist but nodes are missing | Python package import failed before model loading | Fix the import first |
| Server starts but node count is lower | Partial failure | Restart after installing and recheck /object_info |
| Error comes from a plugin folder | Plugin also depends on Spandrel | Still install in the environment that launches ComfyUI |
Step 1: Install Spandrel
Windows portable:
.\python_embeded\python.exe -s -m pip install spandrelManual venv:
python -m pip install spandrelStep 2: Verify The Import
.\python_embeded\python.exe -s -c "import spandrel; print('import ok')"Manual venv:
python -c "import spandrel; print('import ok')"If this succeeds but ComfyUI still reports the error, you probably installed into one Python and launched ComfyUI with another.
Step 3: Restart And Check The Upscale Nodes
Restart ComfyUI:
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-buildIn the SEO Lab repair, installing spandrel raised the /object_info node count from 685 to 687. Your count may differ, but the important signal is that the nodes_upscale_model.py import failure disappears.
What Not To Do
- do not move upscale model files while the error is a Python import failure
- do not install random upscaling plugins before fixing
spandrel - do not install into system Python when ComfyUI uses
python_embeded - do not assume the server is fully healthy just because the browser opens
Related Guides
- Repair ComfyUI Portable Dependencies One Missing Module At A Time
- No module named 'kornia' in ComfyUI
- No module named 'simpleeval' in ComfyUI
- Fix No module named errors in ComfyUI
- Where to Put Safetensors in ComfyUI
Source References
- Windows portable SEO Lab repair, May 18, 2026:
No module named 'spandrel'blockedComfyUI\comfy_extras\nodes_upscale_model.py - Same lab verification:
/object_infonode count rose from 685 to 687 after installingspandrel - spandrel on PyPI
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.