ComfyUI: ModuleNotFoundError: No module named 'gguf' (fix)
ModuleNotFoundError: No module named 'gguf' means the ComfyUI-GGUF custom node was cloned but its requirements were not installed into ComfyUI's Python. We reproduced it on ComfyUI v0.37.0 and fixed it.
1. The error
ComfyUI v0.37.0 (CPython 3.11, torch 2.9.0+cpu) with ComfyUI-GGUF cloned into custom_nodes/ but its requirements not installed, python main.py --cpu:
[WARNING] Traceback (most recent call last):
File "ComfyUI/nodes.py", line 2266, in load_custom_node
module_spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 940, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "ComfyUI/custom_nodes/ComfyUI-GGUF/__init__.py", line 7, in <module>
from .nodes import NODE_CLASS_MAPPINGS
File "ComfyUI/custom_nodes/ComfyUI-GGUF/nodes.py", line 16, in <module>
from .ops import GGMLOps, move_patch_to_device
File "ComfyUI/custom_nodes/ComfyUI-GGUF/ops.py", line 2, in <module>
import gguf
ModuleNotFoundError: No module named 'gguf'
[WARNING] Cannot import ComfyUI/custom_nodes/ComfyUI-GGUF module for custom nodes: No module named 'gguf'
ComfyUI itself keeps running; only the custom node fails. The startup summary marks it:
Import times for custom nodes:
[INFO] 0.0 seconds: ComfyUI/custom_nodes/websocket_image_save.py
[INFO] 0.0 seconds (IMPORT FAILED): ComfyUI/custom_nodes/ComfyUI-GGUF
In the browser this shows up as missing node types (UnetLoaderGGUF, CLIPLoaderGGUF, DualCLIPLoaderGGUF ...) when you load a workflow that uses GGUF models. ops.py, loader.py and dequant.py all import gguf at the top; gguf is the PyPI package from the llama.cpp project, listed in the node's requirements.txt as gguf>=0.13.0.
2. Fix: install the node's requirements into ComfyUI's Python
cd ComfyUI/custom_nodes/ComfyUI-GGUF
python -m pip install -r requirements.txt
Use the same python that runs main.py: with a venv, activate it first; on the Windows portable build, run ..\..\..\python_embeded\python.exe -m pip install -r requirements.txt from the node folder. A pip from another Python installs gguf where ComfyUI never looks, and the error stays. After installing (gguf 0.19.0), the same start printed no warning and the node loaded:
Import times for custom nodes:
[INFO] 0.0 seconds: ComfyUI/custom_nodes/websocket_image_save.py
[INFO] 0.0 seconds: ComfyUI/custom_nodes/ComfyUI-GGUF
Restart ComfyUI after installing: custom nodes are imported once at startup.
Related: ComfyUI: No module named 'ultralytics' · ComfyUI: No module named 'av' · ComfyUI: No module named 'sqlalchemy' · ComfyUI: No module named 'torchaudio'
Frequently asked questions
Does ComfyUI stop when gguf is missing?
No. ComfyUI starts; only ComfyUI-GGUF is marked IMPORT FAILED, so its GGUF loader nodes are missing from workflows.
I installed gguf but still get the error
pip installed it into a different Python. Run python -m pip with the interpreter that runs main.py (python_embeded on the portable build), then restart ComfyUI.
Written with AI assistance. Measured on 2026-10-24 on Linux, CPython 3.11.17: ComfyUI v0.37.0, torch 2.9.0+cpu, ComfyUI-GGUF at commit 6ea2651, without and with gguf 0.19.0. Output pasted unedited except shortened paths. PlainTables is our extension; ComfyUI, ComfyUI-GGUF and gguf are free.