LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

ModuleNotFoundError: No module named 'triton' in ComfyUI

Partially verifiedMedium riskTested on Windows 10, Windows 11 | portable | Python 3.11+ | CUDA 12.x | Torch 2.x | ComfyUI portable embedded Python, triton-windows, and SageAttention-linked repairsLast verified 2026-07-08Estimated time 10-30 minutes

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 seeMeaningBest action
Found comfy_kitchen backend triton: {'available': False, ...} and ComfyUI opensOptional backend unavailableUsually ignore it
ModuleNotFoundError: No module named 'triton' during workflow import or queueA custom node tried to import TritonRepair Triton in the same Python environment
No module named 'triton' during a SageAttention nodeSageAttention or a node needs TritonFix Triton in the same Python environment
No module named 'flash_attn' near SageAttention/Triton setupAdjacent attention package missingTreat as part of the same acceleration stack; check whether the workflow truly needs FlashAttention
pip install triton fails on WindowsThe normal triton path is not the Windows fixUse triton-windows instead
Installed Triton but ComfyUI still cannot import itInstalled into the wrong PythonUse the Python that launches ComfyUI
tcc.exe, triton_key, or compiler errors after installingVersion or runtime mismatchCheck 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-windows

For 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 triton

Then 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):

PyTorchExpected Triton Minor
2.63.2
2.73.3
2.83.4
2.93.5
2.10 or 2.113.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

ErrorLikely causeFix
No module named 'triton' after installWrong Python environmentUse the portable bundled Python, launch venv, or app-managed terminal
No module named 'triton.language'; 'triton' is not a packageA local file/folder named triton shadows the packageRename the file/folder
DLL load failedMissing runtime dependency or incompatible wheelInstall Visual C++ Redistributable and check package versions
tcc.exe compile failureTriton runtime/compiler mismatchCheck triton-windows and PyTorch versions
cannot import triton_keyPackage version mismatchRemove stale Triton packages and install a matching range
ComfyUI worked before installing acceleration packagesOptional package destabilized the environmentUninstall and return to PyTorch attention

What not to do

  • Do not install triton into 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\Lib when the instructions say libs.

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

  • triton-windows GitHub repository
  • triton-windows PyPI package
  • ComfyUI issue: No module named 'triton'
  • ComfyUI issue: Triton not working in the desktop app
  • ComfyUI forum: comfy_kitchen backend triton on Windows
Related guides:Fix SageAttention missing errorsRepair 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

The two Triton patterns
Triage
What Triton does in ComfyUI
Step 1: Decide whether this is fatal
Step 2: Check the exact Python ComfyUI uses
Step 3: On Windows, do not use the normal triton package
Step 4: Match PyTorch and Triton versions
Step 5: Embedded Python may need include and libs
Step 6: Verify before restarting
Common failure cases
What not to do
FAQ
Is comfy_kitchen backend triton a fatal error?
Should I run pip install triton on Windows?
Why do Easy-SAM3, Trellis, or WanVideoWrapper mention Triton?
Related Guides
Source References