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
88442 skills4 agents11 commands1 MCP

Claude Code

$ npx -y skills add artokun/comfyui-mcp --skill triton-sageattention --agent claude-code

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
@artokun
Ships withcomfyui-mcp

<img src="docs/images/demo-poster.jpg" width="760" alt="The Agent panel driving ComfyUI end to end. Click to watch the demo"> The Agent panel driving ComfyUI end to end. It reads what is installed locally, wires the graph, frees VRAM, and runs the render.

88442 skills4 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
884
Star history of artokun/comfyui-mcp on GitHub, a chart by star-history.com

Other skills on comfyui-mcp.

ai-toolkit-trainer

ai-toolkit-trainer

Train custom LoRAs with ostris AI-Toolkit. Covers WAN 2.2/2.1 (people, styles, video motion) and Z-Image (Turbo & Base, low-VRAM…

@artokun@artokunInstall Skill
anima-base

anima-base

Anime/illustration text-to-image (ANIMA 1.0, ~2B Cosmos DiT). Use for anime, manga, illustrated characters; accepts Danbooru tags…

@artokun@artokunInstall Skill
anima-lora-trainer

anima-lora-trainer

Train a custom anime LoRA on the ANIMA base model with Citron's local Gradio trainer (kohya sd-scripts), <6GB VRAM,…

@artokun@artokunInstall Skill
civitai

civitai

Discover Civitai models with the BUILT-IN download_model action:"search_civitai" and install/generate them locally. Find a…

@artokun@artokunInstall Skill
color-correction

color-correction

Diagnose and fix video/image color OBJECTIVELY with the get_image (action:"analyze_color") tool (scopes/stats such as black/white…

@artokun@artokunInstall Skill
comfyui-core

comfyui-core

Core ComfyUI knowledge covering workflow format, node types, pipeline patterns, and MCP tool usage

@artokun@artokunInstall Skill

More skills from other plugins.

agent-builder

agent-builder

Load immediately after an Agent intent, before the first agent_builder_* call. Governs how you create, configure, test, and…

n8n12d209k
@n8n-io@n8n-ioInstall Skill
browser-use

browser-use

Direct browser control via CDP for web interaction: automation, scraping, testing, screenshots, and site/app work. Also covers…

@browser-use@browser-useInstall Skill
agent-browser

agent-browser

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling…

@vercel-labs-2@vercel-labs-2Install Skill
add-anydoc

add-anydoc

Add local office-document-to-Markdown conversion to NanoClaw agent containers with the pinned Firecrawl AnyDoc CLI. Use when…

@nanocoai@nanocoaiInstall Skill

Questions about triton-sageattention.

Which coding agents can use triton-sageattention?
triton-sageattention installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.