LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

ComfyUI ModuleNotFoundError: No module named 'sageattention'

Partially verifiedMedium riskTested on Windows 10, Windows 11 | portable | Python Python 3.11 tested; verify your actual ComfyUI runtime | CUDA 12.x | Torch 2.x | ComfyUI portable and manual venv patternsLast verified 2026-06-29Estimated time 3-45 minutes

Decide whether ComfyUI No module named 'sageattention' is a harmless startup warning or a workflow-blocking Wan/Hunyuan/LTX/Qwen error. Prefer SDPA/Comfy first, then check the exact Python, Triton, and SageAttention.

No module named 'sageattention' does not always mean you should install SageAttention.

For many ComfyUI users, it is only an optional acceleration warning. For video workflows such as WanVideoWrapper, HunyuanVideo, LTX, or Qwen Image, it can also be a real queue-time failure. This page helps you decide which case you are in before you change Python packages.

30-second triage

What you seeWhat it usually meansDo this first
Startup warning, but ComfyUI opens and workflows runOptional backend is unavailableIgnore it or leave SageAttention disabled
Queue fails inside WanVideoWrapper, HunyuanVideo, LTX, or Qwen ImageThe workflow requested SageAttentionSwitch the node backend to sdpa, comfy, torch, or auto
You added --use-sage-attentionComfyUI is being forced to use SageAttention globallyRemove the flag and restart
No module named 'triton' appears tooTriton layer is missing or wrongFix Triton before SageAttention
DLL load failed while importing _fusedA wheel was installed but does not match Python/Torch/CUDA/GPUStop reinstalling; roll back or choose a matching build
sageattention is not new enough version or could not determine cuda architecture, cannot apply ... memory efficient sage attention patchThe installed SageAttention cannot be verified or is too old for the workflow's patchUpdate SageAttention for your Torch/CUDA, or disable the patch and use sdpa/comfy attention
unsupported head_dim: 256, using pytorch attention insteadComfyUI fell back to PyTorch attentionUsually not fatal unless the workflow stops

Step 1: decide whether this is a warning or a workflow failure

If the log only says:

[WARNING] Warning: Could not load sageattention: No module named 'sageattention'
[WARNING] sageattention package is not installed, sageattention will not be available

and ComfyUI still reaches the browser UI, this is usually not an emergency.

SageAttention is an optional attention acceleration backend. ComfyUI and many workflows can run with sdpa, comfy, torch, or auto.

Stay on this page if the workflow actually stops, especially with a traceback around video or attention nodes.

sageattention is not new enough version ... cannot apply minimax h3 memory efficient sage attention patch

If that is the exact log, this page is the wrong owner. Confirm ComfyUI still queues, then use the MiniMax H3 setup guide. Stay here only for No module named 'sageattention'.

sageattention is not new enough version ... cannot apply ltx2 memory efficient sage attention patch

If that is the exact log, this page is the wrong owner. Confirm ComfyUI still queues, then use the LTX-2 setup guide. Stay here only for No module named 'sageattention'.


Step 2: disable SageAttention before installing anything

Most users should first remove the forced SageAttention path.

If you added a launch flag

Remove:

--use-sage-attention

Restart ComfyUI.

If the workflow node has an attention backend dropdown

Open the model loader, video wrapper, or attention-related node and change:

sageattn
sageattention
SageAttention

to one of:

sdpa
comfy
torch
auto

Then queue the workflow again.

For WanVideoWrapper and video workflows

Many Wan/Hunyuan/LTX/Qwen video workflows expose an attention backend option. If switching to sdpa or comfy makes the workflow run, you do not need SageAttention to fix the current job.


Step 3: confirm the exact Python ComfyUI uses

Installing into the wrong Python is the most common reason this error keeps coming back.

Windows Portable

Open PowerShell in the ComfyUI_windows_portable folder:

.\python_embeded\python.exe -s -c "import sys; print(sys.executable)"
.\python_embeded\python.exe -s --version

The path should point to the current portable folder:

ComfyUI_windows_portable\python_embeded\python.exe

Use this same interpreter for every later pip show, install, uninstall, and verification command.

Manual venv

Activate the venv that starts ComfyUI, then run:

python -c "import sys; print(sys.executable)"
python --version

Make sure it is not system Python, Conda, or Windows Store Python.

Finding the path in Wonderful Launcher

If you manage ComfyUI with Wonderful Launcher, the current instance startup log often shows the launch command or Python path near the beginning. Search for python.exe, python_embeded, or the launch command. If the full path is not shown, run the commands above inside the actual ComfyUI folder.


Step 4: check Triton without mixing up package names

SageAttention on Windows often depends on Triton.

The Windows distribution package is usually:

triton-windows

but the Python import is still:

import triton

Windows Portable

.\python_embeded\python.exe -s -m pip show triton-windows
.\python_embeded\python.exe -s -c "import triton; print(triton.__version__)"

Manual venv

python -m pip show triton-windows
python -c "import triton; print(triton.__version__)"

If import triton fails, do not continue reinstalling SageAttention. Fix the Triton layer first:

Triton missing or unavailable in ComfyUI


Step 5: decide whether installing SageAttention is worth it

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

  • the workflow has no sdpa, comfy, torch, or auto alternative;
  • the node or workflow author explicitly requires SageAttention;
  • you are intentionally optimizing a video workflow and are ready to handle Python/Torch/CUDA/Triton compatibility.

Do not install it just because a startup warning exists.

Avoid installing when:

  • torch.cuda.is_available() is false;
  • you cannot identify the Python ComfyUI actually uses;
  • you cannot find a build that matches Python, PyTorch, CUDA, and GPU architecture;
  • the workflow runs correctly after switching to sdpa or comfy.

Step 6: if you must install it, record the environment and use the install guide

Windows does not have one universal SageAttention command for every ComfyUI environment.

Before installing, record:

nvidia-smi

Windows Portable

.\python_embeded\python.exe -s --version
.\python_embeded\python.exe -s -m pip freeze > sageattention-before.txt
.\python_embeded\python.exe -s -c "import torch; print(torch.__version__); print(torch.version.cuda); print(torch.cuda.is_available())"

Manual venv

python --version
python -m pip freeze > sageattention-before.txt
python -c "import torch; print(torch.__version__); print(torch.version.cuda); print(torch.cuda.is_available())"

When selecting any wheel, use torch.version.cuda, not the top-level CUDA version shown by nvidia-smi.

Then continue here:

Install SageAttention in Windows ComfyUI

Return to this page for Step 7 after the install guide passes.


Step 7: after installation, verify it in the same Python

Do not rely only on Successfully installed.

Windows Portable

.\python_embeded\python.exe -s -m pip show sageattention
.\python_embeded\python.exe -s -c "from sageattention import sageattn; print('SageAttention OK')"

Manual venv

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

Then restart ComfyUI and queue the original workflow again.

If the log changes from No module named 'sageattention' to DLL load failed while importing _fused, this is not progress. It means the installed build does not match the runtime. Roll back or choose a compatible build.


If the repair still fails

New symptomLikely causeNext step
pip install succeeded but ComfyUI still says missingInstalled into the wrong PythonRepeat Step 3 and reinstall into the exact interpreter
No module named 'triton'Triton is missing or wrongFix Triton first
DLL load failed while importing libtritonTriton binary or runtime issueUse the Triton guide
DLL load failed while importing _fusedSageAttention wheel mismatchUninstall that build and return to SDPA/Comfy
unsupported head_dimCurrent model shape is not supported by the selected backendUse PyTorch/SDPA/Comfy attention
black images or CUDA errorsKernel/runtime mismatchDisable SageAttention and roll back

Safe rollback

First disable the workflow or launch setting:

--use-sage-attention

Switch the node backend back to:

sdpa
comfy
torch
auto

Uninstall SageAttention from the same Python:

Windows Portable

.\python_embeded\python.exe -s -m pip uninstall sageattention -y

Manual venv

python -m pip uninstall sageattention -y

Do not blindly uninstall triton-windows if it existed before this repair. Compare against sageattention-before.txt first.


Why reinstalling ComfyUI usually does not help

This error usually belongs to the runtime package layer, not the workflow JSON itself.

Reinstalling ComfyUI can still leave you with:

  • the wrong Python environment;
  • the same missing Triton layer;
  • the same incompatible wheel;
  • the same workflow forcing SageAttention;
  • the same GPU/PyTorch/CUDA mismatch.

Fix the decision path first: warning or fatal, forced or optional, correct Python or wrong Python, Triton valid or broken, install required or unnecessary.


What SageAttention is

SageAttention is an optimized attention backend used by some large image and video workflows. In ComfyUI it is not a universal dependency.

If a workflow runs with SDPA, Comfy, or PyTorch attention, you can usually keep working without SageAttention. If a specific node forces SageAttention, treat it as a native acceleration stack that must match Python, PyTorch, CUDA, Triton, Windows, and GPU architecture.


FAQ

Can I ignore No module named 'sageattention'?

Yes, if ComfyUI starts and your workflow still runs. It is often only an optional acceleration warning.

Why did pip install sageattention not fix it?

Usually because it installed into the wrong Python, installed the wrong SageAttention version, or did not fix the Triton/CUDA layer.

Should I install triton or triton-windows?

On Windows ComfyUI, use the current Triton Windows guidance. The package name is often triton-windows, while the import remains import triton.

Does Wonderful Launcher fix this automatically?

Wonderful Launcher can help you preserve environment context, read startup logs, and avoid guessing the wrong Python path. It does not make every SageAttention/Triton wheel compatible with every Python, PyTorch, CUDA, and GPU combination.

Related guides

  • Install SageAttention in Windows ComfyUI
  • SageAttention is not new enough version — MiniMax H3
  • SageAttention is not new enough version — LTX-2
  • Triton missing or unavailable in ComfyUI
  • ComfyUI plugin import failed
  • ComfyUI dependency conflicts
  • ComfyUI startup failed

Source references

  • SageAttention official GitHub repository
  • SageAttention PyPI page
  • ComfyUI command-line arguments
  • ComfyUI issue: SageAttention installed into the wrong Python
  • WanVideoWrapper issue: model loading cannot find SageAttention
  • ComfyUI issue: SageAttention DLL load failed
  • triton-windows PyPI page
  • Triton Windows current project
  • Triton Windows historical repository
  • NVIDIA CUDA Toolkit, Driver, and Architecture Matrix
Related guides:Start from the No module named hubFix Triton on WindowsRepair PyTorch CUDA firstAvoid risky package repairs

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

Step 1: decide whether this is a warning or a workflow failure
sageattention is not new enough version ... cannot apply minimax h3 memory efficient sage attention patch
sageattention is not new enough version ... cannot apply ltx2 memory efficient sage attention patch
Step 2: disable SageAttention before installing anything
If you added a launch flag
If the workflow node has an attention backend dropdown
Step 3: confirm the exact Python ComfyUI uses
Windows Portable
Manual venv
Step 4: check Triton without mixing up package names
Windows Portable
Manual venv
Step 5: decide whether installing SageAttention is worth it
Step 6: if you must install it, record the environment and use the install guide
Windows Portable
Manual venv
Step 7: after installation, verify it in the same Python
Windows Portable
Manual venv
If the repair still fails
Safe rollback
Windows Portable
Manual venv
Why reinstalling ComfyUI usually does not help
What SageAttention is
FAQ
Can I ignore No module named 'sageattention'?
Why did pip install sageattention not fix it?
Should I install triton or triton-windows?
Does Wonderful Launcher fix this automatically?
Related guides
Source references