ModuleNotFoundError: No module named 'triton' in ComfyUI
Fix ModuleNotFoundError: No module named 'triton' in ComfyUI by separating harmless comfy_kitchen logs from blocking SageAttention, WanVideoWrapper, or acceleration-stack failures.
For ModuleNotFoundError: No module named 'triton' or the long Found comfy_kitchen backend triton: {'available': False, ...} log, first decide whether it is an optional backend report or a workflow-blocking import error.
30-second decision
If the only message is comfy_kitchen backend triton and ComfyUI opens, leave it alone. If Easy-SAM3, Trellis, WanVideoWrapper, SageAttention, or another workflow fails with ModuleNotFoundError: No module named 'triton', repair Triton in the same Python environment that starts ComfyUI. On Windows, start with triton-windows, not a blind pip install triton.
If your blocking message is only No module named 'sageattention' and Triton is not mentioned, use SageAttention missing first.
The two Triton patterns
Found comfy_kitchen backend triton: {'available': False, 'disabled': True, 'unavailable_reason': "ImportError: No module named 'triton'", 'capabilities': []}ModuleNotFoundError: No module named 'triton'The first is usually a capability report, not a crash. The second means a node actually tried to import Triton and stopped.
Triage
| What you see | Meaning | Best action |
|---|---|---|
Found comfy_kitchen backend triton: {'available': False, ...} and ComfyUI opens | Optional backend unavailable | Usually ignore it |
ModuleNotFoundError: No module named 'triton' during workflow import or queue | A custom node tried to import Triton | Repair Triton in the same Python environment |
No module named 'triton' during a SageAttention node | SageAttention or a node needs Triton | Fix Triton in the same Python environment |
No module named 'flash_attn' near SageAttention/Triton setup | Adjacent attention package missing | Treat as part of the same acceleration stack; check whether the workflow truly needs FlashAttention |
pip install triton fails on Windows | The normal triton path is not the Windows fix | Use triton-windows instead |
| Installed Triton but ComfyUI still cannot import it | Installed into the wrong Python | Use the Python that launches ComfyUI |
tcc.exe, triton_key, or compiler errors after installing | Version or runtime mismatch | Check PyTorch/Triton mapping and rollback if needed |
If the same startup warning repeats but your workflow still runs, it is noise. If a specific node stops because it imports triton, it is actionable.
What Triton does in ComfyUI
Triton is a GPU programming language and compiler used by PyTorch compiler paths, SageAttention, and some newer acceleration backends. ComfyUI does not need it for ordinary image generation. It matters when you use SageAttention (or a node wrapping it), torch.compile or compiled kernels, comfy_kitchen acceleration backends, or video/large-model workflows that ask for Triton-based acceleration.
SageAttention and Triton often appear as the same repair path: SageAttention is the feature; Triton is a lower-level package it may need for compiled kernels. The safe order is: confirm ComfyUI starts, confirm the exact Python, fix Triton only if the failing workflow needs it, then verify SageAttention after Triton works.
Step 1: Decide whether this is fatal
If the terminal reaches To see the GUI go to: http://127.0.0.1:8188 and a small default workflow runs, treat the Triton line as optional. If a specific workflow fails, read the stack trace and identify which package asked for Triton (often SageAttention nodes, Wan/LTX video workflows, or optimization nodes).
Step 2: Check the exact Python ComfyUI uses
Most failed repairs install into system Python while ComfyUI uses embedded Python. For the GitHub Windows portable package, run from the extracted portable root (the folder with run_*.bat, python_embeded, and ComfyUI):
.\python_embeded\python.exe -s -c "import sys; print(sys.executable); print(sys.version)"
.\python_embeded\python.exe -s -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"
.\python_embeded\python.exe -s -m pip show triton triton-windowsFor a manual install, activate the launch venv and use python -c ... / python -m pip show .... If torch.cuda.is_available() is False, fix PyTorch/CUDA first. For ComfyUI Desktop, use the app's terminal; do not assume the portable python_embeded path exists.
Step 3: On Windows, do not use the normal triton package
Use triton-windows, not a blind pip install triton. Remove an old/wrong triton from the same environment first:
.\python_embeded\python.exe -s -m pip uninstall -y tritonThen install triton-windows:
.\python_embeded\python.exe -s -m pip install -U "triton-windows<3.7"For a manual venv:
python -m pip uninstall -y triton
python -m pip install -U "triton-windows<3.7"The version cap avoids pulling a future Triton minor before your PyTorch stack is ready.
Step 4: Match PyTorch and Triton versions
Each PyTorch minor works with a matching Triton minor. As a practical guide (use the upstream triton-windows compatibility table when in doubt):
| PyTorch | Expected Triton Minor |
|---|---|
| 2.6 | 3.2 |
| 2.7 | 3.3 |
| 2.8 | 3.4 |
| 2.9 | 3.5 |
| 2.10 or 2.11 | 3.6 |
Python version alone is not enough — PyTorch, CUDA, GPU, and the package that needs Triton also matter.
Step 5: Embedded Python may need include and libs
Some portable builds use embedded Python. The triton-windows instructions call out that Python headers and libraries may need to exist beside the embedded python.exe, in folders named include and libs. Do not confuse libs with Lib (the normal library folder, which should not be modified). If Triton imports but compilation fails or the error mentions missing headers/libraries, follow the triton-windows embedded Python section for the exact include and libs files that match your Python minor version.
Step 6: Verify before restarting
.\python_embeded\python.exe -s -c "import triton; print(triton.__version__)"
.\python_embeded\python.exe -s -c "import torch; print(torch.__version__, torch.version.cuda, torch.cuda.is_available())"If the import test fails, ComfyUI will too. For kernel-level validation, use the test script from the triton-windows repository (a plain import proves the package is installed; a kernel test proves it can compile and run a CUDA kernel).
Common failure cases
| Error | Likely cause | Fix |
|---|---|---|
No module named 'triton' after install | Wrong Python environment | Use the portable bundled Python, launch venv, or app-managed terminal |
No module named 'triton.language'; 'triton' is not a package | A local file/folder named triton shadows the package | Rename the file/folder |
DLL load failed | Missing runtime dependency or incompatible wheel | Install Visual C++ Redistributable and check package versions |
tcc.exe compile failure | Triton runtime/compiler mismatch | Check triton-windows and PyTorch versions |
cannot import triton_key | Package version mismatch | Remove stale Triton packages and install a matching range |
| ComfyUI worked before installing acceleration packages | Optional package destabilized the environment | Uninstall and return to PyTorch attention |
What not to do
- Do not install
tritoninto system Python and expect ComfyUI portable to see it. - Do not install Triton only because a startup capability line mentions it.
- Do not mix random SageAttention, PyTorch, CUDA, and Triton wheels from different guides.
- Do not run package repairs as Administrator unless you intentionally installed ComfyUI in a protected system path.
- Do not modify
python_embeded\Libwhen the instructions saylibs.
FAQ
Is comfy_kitchen backend triton a fatal error?
Not always. If ComfyUI opens and your workflow runs, it is usually an optional capability report. Treat it as fatal only when a workflow or node fails because it tried to import Triton.
Should I run pip install triton on Windows?
Usually no. Use the triton-windows path and install into the exact Python that launches ComfyUI.
Why do Easy-SAM3, Trellis, or WanVideoWrapper mention Triton?
They can use acceleration-heavy nodes. Triton may be lower in the dependency chain than the visible node, so the workflow can fail even though ordinary image generation still works.
Related Guides
- ComfyUI No Module Named 'sageattention': Ignore or Fix?
- Fix No module named errors in ComfyUI
- ComfyUI Dependency Conflicts
- ComfyUI Torch Not Compiled With CUDA Enabled
- GPU Compatibility
- ComfyUI Common Issues
Source References
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 packagesDid this fix your issue?
Your answer helps prioritize verified ComfyUI repairs.