ModuleNotFoundError: No module named 'nunchaku' in ComfyUI
Fix ModuleNotFoundError: No module named 'nunchaku' in ComfyUI, including nunchaku.lora, nunchaku.utils, nunchaku.models, NunchakuFluxLoraLoader, and NunchakuFluxDiTLoader failures.
For ModuleNotFoundError: No module named 'nunchaku' (and nunchaku.lora, nunchaku.models, or red NunchakuFluxLoraLoader / NunchakuFluxDiTLoader nodes): do not install the unrelated PyPI package named nunchaku — it is an unrelated scientific package. First confirm whether the ComfyUI-nunchaku plugin imported, then install the official Nunchaku wheel that matches your Python, PyTorch, CUDA, and GPU.
Exact error logs
ModuleNotFoundError: No module named 'nunchaku'
ModuleNotFoundError: No module named 'nunchaku.lora'
ModuleNotFoundError: No module named 'nunchaku.models'
ImportError: cannot import name 'SVDQW4A4Linear'
Node import failed: NunchakuFluxLoraLoader
Node import failed: NunchakuFluxLoraStack
Node import failed: NunchakuFluxDiTLoaderRed NunchakuFlux... node names are the visible workflow symptom. The root problem is usually that the ComfyUI-nunchaku plugin could not load its Nunchaku backend.
Nunchaku is a 4-bit quantized inference engine (SVDQuant method) used through the ComfyUI-nunchaku plugin to run quantized FLUX, Qwen-Image, SANA, and PixArt workflows on NVIDIA GPUs. ComfyUI runs fine without it — install it only when your workflow uses ComfyUI-nunchaku nodes or SVDQuant/Nunchaku quantized model files.
Triage
| What you see | What it usually means | First step |
|---|---|---|
No module named 'nunchaku' | The backend package is missing from the ComfyUI environment | Install a matching official Nunchaku wheel |
No module named 'nunchaku.lora', nunchaku.utils, or nunchaku.models | Backend missing, incomplete, or mismatched with the plugin | Repair the official backend and plugin together; do not install a dotted submodule separately |
Red NunchakuFluxLoraLoader / NunchakuFluxLoraStack | Nunchaku LoRA nodes did not register | Check the plugin import failure before editing the workflow |
NunchakuFluxDiTLoader missing | The FLUX DiT loader did not register | Verify the plugin and backend wheel together |
cannot import name 'SVDQW4A4Linear' | Plugin and wheel versions may not match | Update the plugin and choose a compatible wheel |
No matching distribution found | No wheel matches your Python/PyTorch/CUDA/platform | Re-check the environment before forcing a build |
pip install nunchaku advice | Wrong repair path for ComfyUI Nunchaku | Stop and use official Nunchaku install sources |
Check the environment before installing
Nunchaku wheels are tied to Python, PyTorch, CUDA, GPU architecture, and plugin version. Verify:
python --version
python -c "import torch; print(torch.__version__, torch.version.cuda)"On the official Windows portable package, run from the portable root with .\python_embeded\python.exe -s .... Match the wheel to the Python tag (cp311, cp312), PyTorch version, CUDA version, Windows architecture, and GPU generation when the docs mention it. Nunchaku is primarily for NVIDIA GPUs; on AMD, Intel, Apple Silicon, or CPU-only hardware, use a different path such as GGUF quantization or a smaller model.
Installation methods
Method 1: ComfyUI-nunchaku installer workflow
If you have a recent ComfyUI-nunchaku plugin, use its install_wheel.json workflow (the official ComfyUI install path):
- Load
install_wheel.jsonin ComfyUI. - Run the installer node in
update nodemode to fetch available versions. - Select the wheel matching your Python, PyTorch, CUDA, and GPU.
- Run the node in
installmode. - Fully restart ComfyUI (a browser refresh is not enough — custom nodes register at backend startup).
Method 2: Manually install a matching wheel
Download a wheel from Nunchaku's official release sources (GitHub may redirect between org names):
- GitHub Releases:
https://github.com/nunchaku-tech/nunchaku/releases - Hugging Face:
https://huggingface.co/nunchaku-tech - ModelScope:
https://modelscope.cn/organization/nunchaku-tech
Then install with the Python that starts ComfyUI:
python -m pip install <path-or-url-to-matching-nunchaku-wheel.whl>For the official Windows portable package, use .\python_embeded\python.exe -s -m pip install <...>. Do not copy an example wheel URL blindly — a wheel for Python 3.11 / PyTorch 2.7 will not repair a Python 3.12 / different PyTorch environment.
Method 3: Build from source only if you need it
Building on Windows requires a compatible CUDA toolkit, Visual Studio/MSVC, and the correct dev environment. For most users, a prebuilt wheel or the installer workflow is the practical path.
Common installation failures
No matching distribution found— your Python/PyTorch/CUDA combination has no matching wheel from that source. Re-check versions and pick a wheel built for that exact combination.- Wrong package installed — if you installed the unrelated PyPI
nunchaku, uninstall it (python -m pip uninstall nunchaku -y) before installing the correct wheel. - Local directory conflict — a folder named
nunchakuin the working directory can shadow the installed package. Remove any conflicting folder under the ComfyUI root or plugin folder. - Node still red after the wheel imports — the backend may be installed while the custom node is stale or failed at startup. Check
http://127.0.0.1:8188/v2/customnode/import_fail_info_bulkand look forComfyUI-nunchaku. If an earlier dependency conflict stopped the plugin, repair that earliest failure first (see dependency conflicts). - RTX 20 series — older Turing GPUs have different datatype/attention constraints than Ada/Blackwell. Follow the Nunchaku docs for node settings for your GPU generation.
Verify
python -c "import nunchaku; print(getattr(nunchaku, '__version__', 'installed'))"Then fully restart ComfyUI and confirm the ComfyUI-nunchaku nodes register.
Alternatives
If your hardware does not meet Nunchaku's requirements: full-precision models (with enough VRAM), GGUF quantization (easier across setups), smaller models (SDXL/SD 1.5), or cloud GPU.
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.