triton-sageattention

Installs Triton and SageAttention to accelerate ComfyUI video workflows with version-matched wheels.

715|111|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/artokun/comfyui-mcp --skill triton-sageattention
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: triton-sageattention
Source: https://github.com/artokun/comfyui-mcp/tree/main/plugin/skills/triton-sageattention
Command: npx skills add https://github.com/artokun/comfyui-mcp --skill triton-sageattention

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires triton-windows, sageattention, torch.

What problem does it solve?

ComfyUI video workflows (especially WanVideoWrapper graphs) crash with "No module named 'sageattention'" or "triton: unavailable" when they assume SageAttention and torch.compile are installed, and installing the wrong wheel can break the torch environment entirely.

Core Features & Use Cases

  • Safe sdpa fallback first: Switch WanVideoModelLoader attention_mode to sdpa and disconnect WanVideoTorchCompileSettings so the workflow renders unaccelerated before any risky install.
  • Version-matched Windows install: Detect the correct ComfyUI python (Desktop standalone-env, Portable python_embeded, or manual venv), read torch/CUDA/python versions, and install matching triton-windows and woct0rdho SageAttention wheels.
  • Linux and Mac guidance: Use official triton and pip sageattention on Linux; on Mac skip acceleration entirely and use sdpa on the MPS backend.
  • Use Case: A user loads a Wan video workflow that crashes on sageattn. The skill flips attention to sdpa to get a render, then offers to install Triton + SageAttention matched to torch 2.10/cu130, verifies torch still imports with CUDA, and re-enables sageattn.

Quick Start

Fix my ComfyUI workflow that crashes with "No module named 'sageattention'" and then install Triton and SageAttention matched to my torch and CUDA versions.

Frequently Asked Questions about triton-sageattention

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix "No module named 'sageattention'" in ComfyUI?

Set every WanVideoModelLoader attention_mode to sdpa and disconnect the WanVideoTorchCompileSettings node so the workflow renders unaccelerated. Then optionally install SageAttention with a wheel matched to your torch, CUDA, and python versions.

How do I install Triton and SageAttention on Windows for ComfyUI?

Find the python ComfyUI actually runs (standalone-env or python_embeded), then install triton-windows pinned to your torch minor and the matching woct0rdho SageAttention wheel for your CUDA line. Always use "<that python>" -m pip, never a global pip.

Does SageAttention work on Mac or Apple Silicon?

No, Triton and SageAttention are not available on Mac because there is no CUDA. Use PyTorch sdpa attention on the MPS backend and avoid torch.compile or inductor nodes entirely.

Why does installing SageAttention break my torch installation?

A wheel built for a different CUDA line or torch minor can drag in mismatched CUDA DLLs and break torch imports. Match cu128 versus cu130 and the torch minor exactly, record your torch version first, and roll back if torch stops importing with CUDA.

Is there a SageAttention wheel for Python 3.13?

Yes, the Windows wheels use the cp310-abi3 stable ABI tag, so one wheel covers Python 3.10 through 3.13 and later. The absence of a cp313-specific filename is expected, not a missing build.

When should I use sdpa instead of SageAttention in ComfyUI?

Use sdpa when SageAttention is not installed, when you are on Mac, or when sageattn produces noise or NaN artifacts on your GPU. sdpa is built into PyTorch, always available, and costs speed but not correctness.