ComfyUI: ModuleNotFoundError: No module named 'soundfile' (fix)
ModuleNotFoundError: No module named 'soundfile' in ComfyUI comes from comfyui-various when COMFYUI_JW_ENABLE_EXTRA_NODES=true loads its sound node but soundfile isn't installed in ComfyUI's Python. We reproduced it on v0.37.0 and fixed it.
1. The error
ComfyUI v0.37.0 (CPython 3.11, torch 2.9.0+cpu) with comfyui-various (commit ddf36c6) in custom_nodes/, started with COMFYUI_JW_ENABLE_EXTRA_NODES=true and without the soundfile package (traceback shortened):
[WARNING] Traceback (most recent call last):
...
File "ComfyUI/custom_nodes/comfyui-various/__init__.py", line 78, in <module>
load_nodes(module_name)
File "ComfyUI/custom_nodes/comfyui-various/__init__.py", line 43, in load_nodes
module = importlib.import_module(module_name, package=__name__)
...
File "ComfyUI/custom_nodes/comfyui-various/comfyui_sound.py", line 7, in <module>
import soundfile as sf
ModuleNotFoundError: No module named 'soundfile'
[WARNING] Cannot import ComfyUI/custom_nodes/comfyui-various module for custom nodes: No module named 'soundfile'
and in the startup summary:
[INFO] 0.0 seconds (IMPORT FAILED): ComfyUI/custom_nodes/comfyui-various
ComfyUI keeps running (exit code 0), but all comfyui-various nodes are gone, not just the sound ones: __init__.py imports its node modules one by one in a loop, so the first failing import aborts the whole package.
2. Why it only fails sometimes
comfyui_sound.py (line 7: import soundfile as sf) is in the package's "extra nodes" list, which __init__.py only loads when the environment variable COMFYUI_JW_ENABLE_EXTRA_NODES is true. Without the variable, the same install starts cleanly without soundfile. The repo has no requirements.txt, so neither ComfyUI-Manager nor pip install -r will install soundfile for you.
3. Fix: install soundfile into ComfyUI's Python
python -m pip install soundfile
This installed soundfile 0.14.0, whose Linux, macOS and Windows wheels bundle libsndfile (here 1.2.2), so no system package was needed. After a restart with the variable still set:
[INFO] 0.1 seconds: ComfyUI/custom_nodes/comfyui-various
Use the Python that runs main.py: activate the venv first, or on the Windows portable build run python_embeded\python.exe -m pip install soundfile from the ComfyUI_windows_portable folder. If you don't need the extra nodes, unsetting COMFYUI_JW_ENABLE_EXTRA_NODES also makes the error go away.
Related: ComfyUI: No module named 'yaml' (wrong Python) · ComfyUI: No module named 'ultralytics' · ComfyUI: No module named 'gguf' · ComfyUI: No module named 'torchaudio'
Frequently asked questions
Which node needs soundfile?
comfyui-various by jamesWalker55: its comfyui_sound.py, loaded only when COMFYUI_JW_ENABLE_EXTRA_NODES=true.
Do I need to install libsndfile separately?
Not on Linux x86_64, macOS or Windows: soundfile 0.14.0 wheels bundle libsndfile.
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-various at commit ddf36c6, without and with soundfile 0.14.0. Output pasted unedited except shortened paths and a trimmed traceback. PlainTables is our extension; ComfyUI, comfyui-various and soundfile are free.