Skip to content
Automation
Skill

/triton-sageattention

Install Triton + SageAttention to accelerate ComfyUI (the sageattn attention_mode and inductor torch.compile used by WanVideoWrapper / many video graphs). Windows-first (triton-windows + woct0rdho prebuilt SageAttention wheels matched to torch/CUDA/python into the RIGHT python),

From plugin
comfyui-mcp
74242 skills4 agents11 commands1 MCP
Install
$ npx -y skills add artokun/comfyui-mcp --skill triton-sageattention --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/triton-sageattention

Context preview

The summary Claude sees to decide when to auto-load this skill.

Install Triton + SageAttention to accelerate ComfyUI (the sageattn attention_mode and inductor torch.compile used by WanVideoWrapper / many video graphs). Windows-first (triton-windows + woct0rdho prebuilt SageAttention wheels matched to torch/CUDA/python into the RIGHT python),

SKILL.md

triton-sageattention.SKILL.md
name: triton-sageattention
description: Install Triton + SageAttention to accelerate ComfyUI (the sageattn attention_mode and inductor torch.compile used by WanVideoWrapper / many video graphs). Windows-first (triton-windows + woct0rdho prebuilt SageAttention wheels matched to torch/CUDA/python into the RIGHT python), plus Linux (official triton + build) and Mac (N/A → sdpa/MPS). Also covers the SAFE sdpa / no-compile fallback so an example that assumes sageattn + torch.compile still runs when these aren't installed (video-extend TRAP 5). Use when a loader crashes with "No module named 'sageattention'" or reports triton unavailable, when asked to speed up Wan/video workflows, or when deciding whether to install acceleration vs. fall back.
globs:
  - "**/*.json"
  - "**/packs/**"

Triton + SageAttention (ComfyUI acceleration)

> See also [`comfyui-launch-flags`](../comfyui-launch-flags/SKILL.md) for the full > attention / VRAM / cache flag matrix. Note the Z-Image exception: Z-Image is > broken under `--use-sage-attention`, so launch it with > `--use-pytorch-cross-attention` instead.

Prefer kitchen INT8 attention when it is available

If `kitchen` action:"status" (or `panel_kitchen`) reports kitchen present and `int8_attention_is_available` on this GPU, launch with **`--use-ck-attention`** and **skip the sageattention wheel dance**. Kitchen INT8 attention is a ComfyUI flag; it does not need a version-matched `sageattention` wheel. Restart required, consent-gated like every restart.

Only fall through to the Triton + SageAttention install below when kitchen INT8 is **unknown** or **not available**. A failed kitchen probe is unknown, not a no.

Overview

Two optional accelerators that many modern video graphs (especially kijai's ComfyUI-WanVideoWrapper) reference by default:

  • SageAttention (`import sageattention`), a quantized attention kernel.

Selected via a node's `attention_mode = sageattn` (WanVideoWrapper) or ComfyUI's `--use-sage-attention` startup flag. ~20 to 40% faster sampling on supported NVIDIA GPUs.

  • Triton, the GPU kernel compiler that inductor `torch.compile` needs.

WanVideoWrapper's `WanVideoTorchCompileSettings` (and any `torch.compile`/ inductor node) compiles the model through Triton for another speedup.

> **The risk.** Both are version-locked to your exact torch + CUDA + python. > A wrong wheel does worse than fail to install. It can break the torch install > (mismatched CUDA DLLs, `ImportError`, or silent NaNs). And the failure mode of > not having them is a hard crash before any sampling: > `ValueError: Can't import SageAttention: No module named 'sageattention'`, or > compile errors / `triton: unavailable` in the startup log. This is exactly the > [`video-extend`](../video-extend/SKILL.md) TRAP 5.

> **Therefore the default is to get a working render FIRST with the > [sdpa / no-compile fallback](#the-safe-sdpa--no-compile-fallback-do-this-first), > then OFFER to install acceleration for speed.** Never run a torch-breaking > install unannounced to "fix" a workflow. Fall back, render, then ask.

> **Verification note (June 2026).** Wheel sources, the triton↔torch table, and > the live `attention_mode` enum below were verified against > `woct0rdho/triton-windows`, `woct0rdho/SageAttention` releases, and > WanVideoWrapper's nodes (see [Sources](#sources)). Versions move fast, so always > re-read the live torch/CUDA/python first (commands below) and pick the wheel > that matches. Flag anything you can't confirm rather than guessing.

---

Decide first: do you even need them?

Workflow crashes "No module named 'sageattention'"  ──┐
  or "triton: unavailable" / torch.compile error     ─┤
                                                       ▼
              1. APPLY THE SDPA / NO-COMPILE FALLBACK  → render works now
                                                       ▼
              2. OFFER acceleration, in this order:
                 a. If kitchen INT8 attention is available:
                    "Want --use-ck-attention? No sageattention wheel."
                 b. Else:
                    "Want me to install Triton + SageAttention for ~20–40%
                     faster sampling? It's a version-matched install that
                     touches your torch env — I'll verify torch/CUDA/python
                     first and can roll back."
                                                       ▼
              3. Only on YES → install per-OS below → verify → re-enable
                 sageattn + torch.compile in the workflow.

Mac (no CUDA): skip the install entirely. The answer is always sdpa/MPS.

---

The safe sdpa / no-compile fallback (DO THIS FIRST)

When Triton/SageAttention aren't installed, make the workflow run unaccelerated but correct by switching attention to sdpa (PyTorch's built-in scaled dot-product attention, always available, no extra deps) and removing the `torch.compile`/inductor wiring.

WanVideoWrapper (the common case):

1. On every `WanVideoModelLoader` set `attention_mode` to `sdpa`.

  • Confirmed enum values: `sdpa`, `flash_attn_2`, `flash_attn_3`, `sageattn`,

`sparse_sage_attention`. The examples ship with `sageattn`; `sdpa` is the universal safe one. 2. Disconnect `WanVideoTorchCompileSettings` from each loader's `compile_args` input (or delete/bypass the node). No compile = no Triton needed. 3. (If present) bypass any `WanVideoSetRadialAttention` / `sparse_sage_attention` node. Those also route through SageAttention.

Generic ComfyUI: don't launch with `--use-sage-attention`; bypass any `TorchCompileModel` / inductor node.

This costs you speed, not quality. Use `create_workflow (action:"modify")` / the panel's strip-and-re-point flow to flip the widget and drop the link, then enqueue. Once it renders, offer the install.

> Cross-ref: [`video-extend`](../video-extend/SKILL.md) documents this exact fix > as TRAP 5 for the Pusa extension graph (both `WanVideoModelLoader`s → > `attenti

Read more
Ships withcomfyui-mcp

This project is no longer maintained. ComfyUI now ships official agent and MCP tooling — Comfy Agent and Comfy MCP — built and supported by the Comfy-Org team with deeper integration than a community project can match.

Get the whole plugin

Other skills on comfyui-mcp.