LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download
No Module NamedComfyUI Dependency Conflicts: Fix Without ReinstallingTorch MissingTransformers MissingONNX MissingTriton MissingSageAttention MissingInsightFace MissingNunchaku MissingOpenCV / cv2 Missing
Missing Packages

ModuleNotFoundError: No module named 'sageattention' in ComfyUI

Partially verifiedMedium riskTested on Windows 10, Windows 11 | portable | Python 3.11 | CUDA 12.x | Torch 2.x | ComfyUI portable and manual venv patternsLast verified 2026-05-21Estimated time 10-30 minutes

Fix or ignore ModuleNotFoundError: No module named 'sageattention' in ComfyUI, including WanVideoWrapper warnings, wrong Python, Triton, and CUDA wheel mismatches.

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher

If you searched for ModuleNotFoundError: No module named 'sageattention', comfyui no module named sageattention, or ComfyUI prints No module named 'sageattention', do not reinstall ComfyUI immediately.

In many setups this is only a performance warning: ComfyUI can keep running with PyTorch attention. Fix it only when a workflow, custom node, or launch flag actually requires SageAttention.

30-second decision

If ComfyUI opens and your workflow runs, ignore the missing SageAttention warning. If WanVideoWrapper, a video workflow, or a launch command with --use-sage-attention fails, repair SageAttention in the exact Python environment that starts ComfyUI.

Quick Answer

What You SeeMeaningBest Action
ComfyUI starts and opens normallySageAttention is optional in this environmentIgnore it
ComfyUI starts but a video or acceleration node complainsA custom node tried to use SageAttentionCheck that node's requirements
You launched with --use-sage-attentionYou explicitly told ComfyUI to use itInstall it or remove the flag
pip install succeeds but the warning remainsInstalled into the wrong PythonUse ComfyUI's bundled Python
Wheel install fails with CUDA or Torch mismatchThe wheel does not match your stackPick a matching wheel or skip it

What the Error Looks Like

You may see one of these messages in the terminal:

ModuleNotFoundError: No module named 'sageattention'
Warning: Could not load sageattention: No module named 'sageattention'

The first serious question is not "how do I install it?" The first question is whether ComfyUI still starts.

If the web UI opens and generations run, this message is not the root problem you need to solve.

What SageAttention Is

SageAttention is an attention acceleration project. Its authors describe it as a plug-and-play implementation for SageAttention, SageAttention2, and SageAttention2++.

ComfyUI also has a launch option named --use-sage-attention. That option asks ComfyUI to use SageAttention as the attention backend. If the Python package is not installed, the import fails.

Most ComfyUI users do not need to force this backend. PyTorch attention is the safer default when you are trying to get a stable environment.

How Triton Fits Into SageAttention Errors

SageAttention is the feature users usually want. Triton is often the dependency that makes the Windows repair path confusing.

If the log only says No module named 'sageattention', stay on this page first. Decide whether SageAttention is optional, whether you added --use-sage-attention, and whether you installed into the correct Python.

If the log says No module named 'triton', triton_key, tcc.exe, or a Triton compiler error after installing SageAttention, switch to ComfyUI No Module Named 'triton'. On Windows, that path should use triton-windows and ComfyUI's exact Python environment.

The practical order is:

  1. Get ComfyUI starting normally without optional acceleration flags.
  2. Confirm CUDA-enabled PyTorch works in the same Python.
  3. Fix Triton only if the SageAttention workflow still needs it.
  4. Verify SageAttention import after Triton is working.

Step 1: Check Whether ComfyUI Still Runs

If the terminal reaches a line like this, the missing SageAttention package is probably not fatal:

To see the GUI go to: http://127.0.0.1:8188

Open:

http://127.0.0.1:8188

Then run a small default workflow. If it works, leave SageAttention alone for now.

Recovery rule

Do not install acceleration libraries while debugging a broken ComfyUI environment unless the missing package is the first fatal error.

Step 2: Remove the Flag If You Added It

Check your launch command or .bat file. If you see this flag:

--use-sage-attention

remove it and restart ComfyUI.

That is the lowest-risk fix. The flag is useful only when your Python, PyTorch, CUDA, GPU, and SageAttention build all match.

Step 3: Make Sure You Are Using the Right Python

The most common failed fix is installing SageAttention into system Python while ComfyUI uses a different embedded Python.

For a Windows portable package, run package checks with the bundled Python:

.\python_embeded\python.exe -s -m pip show sageattention
.\python_embeded\python.exe -s -m pip show torch

For a manual install, activate the same virtual environment you use to start ComfyUI:

python -m pip show sageattention
python -m pip show torch

Then check the runtime:

python -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"

If this prints False for CUDA availability, fix PyTorch first. SageAttention will not solve a CPU-only PyTorch install.

Step 4: Decide Whether Installation Is Worth It

Install SageAttention only when at least one of these is true:

  • a workflow or custom node explicitly requires it
  • you intentionally enabled --use-sage-attention
  • you are tuning a heavy video or large-model workflow after the environment is already stable
  • you know your GPU, CUDA, PyTorch, and Python versions

Skip it when:

  • ComfyUI works and this is only a warning
  • you are still fixing startup, custom node, or dependency errors
  • you are on an old GPU or CPU-only setup
  • you cannot identify which Python environment ComfyUI is using

Step 5: Install Only a Matching Build

SageAttention includes CUDA kernels. On Windows, a plain install may try to compile native code or fail because the build does not match your stack.

Before installing anything, record:

CheckCommand
GPU and drivernvidia-smi
PyTorch and CUDApython -c "import torch; print(torch.__version__, torch.version.cuda)"
Python versionpython --version
ComfyUI launch PythonInspect the .bat file or activated venv

Then use a package or wheel that explicitly matches those versions. Do not mix a CUDA 12.8 wheel into a CUDA 12.6 PyTorch environment and expect it to behave.

Step 6: Verify Before Restarting ComfyUI

After installation, verify in the same Python environment:

python -c "from sageattention import sageattn; print('SageAttention OK')"

If that command fails, ComfyUI will fail too. Fix the import before restarting the server.

Common Failure Cases

ErrorLikely CauseFix
No module named 'sageattention' after installInstalled into the wrong PythonUse ComfyUI's Python or venv
No module named 'triton'A dependency path is missingOn Windows, use triton-windows with ComfyUI's Python
C++ build tools errorThe package is compiling native codeUse a compatible prebuilt wheel or skip SageAttention
CUDA version mismatchWheel and PyTorch CUDA differMatch the wheel to your PyTorch build
ComfyUI worked before installing itAcceleration package destabilized the environmentRemove it and return to PyTorch attention

If the blocking error is actually No module named 'triton', fix that first with ComfyUI No Module Named 'triton'. On Windows, the normal triton package is not the safe repair path; use the triton-windows package and the same Python that launches ComfyUI.

When Reinstalling ComfyUI Is the Wrong Move

This error often appears next to other warnings. Reinstalling ComfyUI can make the environment messier if the real issue is:

  • a custom node dependency conflict
  • a package installed into the wrong Python
  • CPU-only PyTorch
  • mismatched CUDA and driver versions
  • a launch flag copied from another machine

Use ComfyUI Dependency Conflicts or How to Fix ComfyUI Plugin Import Failed Errors if several packages are failing at once.

How Wonderful Launcher Helps

Wonderful Launcher is useful when the issue is no longer one clean package install:

  • it keeps ComfyUI environments separated
  • it makes startup logs easier to collect
  • it helps preserve models and workflows before risky repairs
  • it gives you a clearer recovery path than reinstalling everything

If your ComfyUI only shows a harmless SageAttention warning, you do not need a repair session. If the same environment also has custom node import errors, PyTorch/CUDA mismatch, or repeated startup failures, start from ComfyUI Common Issues.

FAQ

Why does WanVideoWrapper say No module named 'sageattention'?

WanVideoWrapper and other video workflows may try to use SageAttention as an acceleration backend. If the workflow fails because of that import, repair SageAttention or switch the workflow/settings back to a non-SageAttention path.

Should I install SageAttention for ComfyUI Desktop?

Only if the Desktop environment and the workflow actually require it. Use the app's managed environment or terminal tools; do not assume a portable python_embeded folder exists.

What if the error changes to No module named 'triton'?

That means the repair has moved lower in the acceleration stack. On Windows, follow the Triton missing guide and use the Python environment that launches ComfyUI.

Related Guides

  • ComfyUI Dependency Conflicts
  • ComfyUI No Module Named 'triton'
  • How to Fix ComfyUI Plugin Import Failed Errors
  • GPU Compatibility
  • ComfyUI Startup Failed? How to Diagnose and Recover Faster

Source References

  • SageAttention official GitHub repository
  • ComfyUI command-line arguments

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher
Related guides:Start from the No module named hubFix Triton on WindowsRepair PyTorch CUDA firstAvoid risky package repairs

Start with Wonderful Launcher if this issue touches your real ComfyUI environment. Use the docs to understand the fix, and use the app to inspect the machine you already have.

Download Wonderful Launcher

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Triton Missing

Fix ModuleNotFoundError: No module named 'triton' in ComfyUI by separating harmless comfy_kitchen logs from blocking workflow or SageAttention failures.

InsightFace Missing

Fix No module named 'insightface' in ComfyUI for ReActor, IPAdapter FaceID, InstantID, PuLID, and other face-swap or face-analysis nodes on Windows.

Table of Contents

Quick Answer
What the Error Looks Like
What SageAttention Is
How Triton Fits Into SageAttention Errors
Step 1: Check Whether ComfyUI Still Runs
Step 2: Remove the Flag If You Added It
Step 3: Make Sure You Are Using the Right Python
Step 4: Decide Whether Installation Is Worth It
Step 5: Install Only a Matching Build
Step 6: Verify Before Restarting ComfyUI
Common Failure Cases
When Reinstalling ComfyUI Is the Wrong Move
How Wonderful Launcher Helps
FAQ
Why does WanVideoWrapper say No module named 'sageattention'?
Should I install SageAttention for ComfyUI Desktop?
What if the error changes to No module named 'triton'?
Related Guides
Source References