LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

No module named 'diffusers' in ComfyUI

Partially verifiedMedium riskTested on Windows 10, Windows 11 | portable | Python 3.11 | CUDA 12.x | Torch 2.x | ComfyUI operator guidance, pending local reproductionLast verified 2026-05-21Estimated time 5-15 minutes

Fix ComfyUI ModuleNotFoundError: No module named 'diffusers' caused by custom nodes that depend on the Hugging Face Diffusers library.

Community Knowledge

This page is based on common ComfyUI troubleshooting patterns and has not been fully tested across all environments. Back up your environment before changing packages.

If ComfyUI logs ModuleNotFoundError: No module named 'diffusers', a custom node that depends on the Hugging Face Diffusers library cannot load.

ComfyUI itself does not require diffusers. This error comes from third-party custom nodes that use the Diffusers pipeline for model loading, conversion, or inference. Common examples include nodes for Stable Diffusion pipelines, IP-Adapter, AnimateDiff, or model conversion utilities.

Fast answer

For the GitHub Windows portable package:

.\python_embeded\python.exe -s -m pip install diffusers
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

For a manual venv install, activate your environment first, then run python -m pip install diffusers.

What the error looks like

IMPORT FAILED: ComfyUI-ExampleNode
Traceback (most recent call last):
  File "...\custom_nodes\ComfyUI-ExampleNode\__init__.py", line 3, in <module>
    from diffusers import StableDiffusionPipeline
ModuleNotFoundError: No module named 'diffusers'

The exact custom node name will vary. The key indicator is No module named 'diffusers' in the traceback.

Why it happens

  • The custom node was installed (cloned or downloaded) but its requirements.txt was never run
  • ComfyUI Manager installed the node files but did not install Python dependencies
  • You reinstalled or updated ComfyUI and the new environment does not have diffusers
  • A previous pip install broke the package and it was silently uninstalled during conflict resolution

Quick diagnosis

CheckCommand (portable)Expected
Is diffusers installed?.\python_embeded\python.exe -s -m pip show diffusersShows version and location
Which node needs it?Read the IMPORT FAILED line in the startup logNames the custom node folder
Any conflicts?.\python_embeded\python.exe -s -m pip checkNo broken requirements

Safe manual fix

Step 1: Install diffusers in the correct Python

For Windows portable:

.\python_embeded\python.exe -s -m pip install diffusers

For a manual venv:

python -m pip install diffusers

This will also install dependencies like safetensors, huggingface-hub, and regex if they are not already present.

Step 2: If the custom node has its own requirements.txt

Check the plugin folder for a requirements file:

Get-Content ComfyUI\custom_nodes\<node-name>\requirements.txt

If it exists, install from it, but read it first to make sure it will not downgrade torch or other core packages:

.\python_embeded\python.exe -s -m pip install -r ComfyUI\custom_nodes\<node-name>\requirements.txt

Step 3: Restart and verify

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

Check the startup log. The IMPORT FAILED line for that node should be gone.

When not to run pip install blindly

diffusers has many dependencies and updates frequently. Be careful about:

  • Installing a version that conflicts with your current transformers or torch version
  • Running pip install diffusers --upgrade when a custom node needs a specific version
  • Installing diffusers[torch] extras that might pull a CPU-only torch build

If pip check shows conflicts after installing, fix the specific version mismatch rather than upgrading everything.

How Wonderful Launcher can help

Wonderful Launcher can help detect and resolve this issue. It helps manage your ComfyUI environment and dependencies safely, reducing the risk of version conflicts that diffusers updates can cause.

Download Wonderful Launcher — it's free and can recover your environment without reinstalling.

Related errors

  • ComfyUI Plugin Import Failed
  • ComfyUI Transformers Missing
  • ComfyUI Dependency Conflicts
  • Plugin Missing Module Warning: When It Is Safe to Ignore
  • ComfyUI Startup Failed

Source References

  • diffusers on PyPI
  • Hugging Face Diffusers GitHub
  • ComfyUI GitHub

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 packages

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

What the error looks like
Why it happens
Quick diagnosis
Safe manual fix
Step 1: Install diffusers in the correct Python
Step 2: If the custom node has its own requirements.txt
Step 3: Restart and verify
When not to run pip install blindly
How Wonderful Launcher can help
Related errors
Source References