triton-sageattention

Featured

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.

AI & Automation 738 stars 120 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 91/100

Stars 20%
96
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# 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 ...

Details

Author
artokun
Repository
artokun/comfyui-mcp
Created
6 months ago
Last Updated
yesterday
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

comfyui-launch-flags

Pick the right ComfyUI startup flags for VRAM, attention, caching, and speed. The full decision matrix for OOM (--novram / --cache-none / --disable-smart-memory), shared-VRAM creep on Windows (--reserve-vram N), model-switching with big text encoders (--cache-none), high-VRAM throughput (--gpu-only / --highvram), and attention-backend selection (--use-sage-attention for speed, --use-pytorch-cross-attention as the highest-quality / Z-Image-safe fallback). Also the acceleration-stack + Blackwell/RTX 5000 (sm_120) notes. Use when a graph OOMs (especially long video like LTX 2 / WAN), when the GPU spills into shared VRAM and slows to a crawl, when switching between models eats all RAM, when Z-Image produces black/garbled output under Sage, or when deciding which attention backend to launch with. Flag names verified against upstream comfy/cli_args.py; see Sources.

738 Updated yesterday
artokun
AI & Automation Featured

optimizing-attention-flash

Optimizes transformer attention with Flash Attention for 2-4x speedup and 10-20x memory reduction. Use when training/running transformers with long sequences (>512 tokens), encountering GPU memory issues with attention, or need faster inference. Supports PyTorch native SDPA, flash-attn library, H100 FP8, and sliding window attention.

244,407 Updated today
NousResearch
AI & Automation Listed

optimizing-attention-flash

Optimizes transformer attention with Flash Attention for 2-4x speedup and 10-20x memory reduction. Use when training/running transformers with long sequences (>512 tokens), encountering GPU memory issues with attention, or need faster inference. Supports PyTorch native SDPA, flash-attn library, H100 FP8, and sliding window attention.

1 Updated 1 months ago
dsivov