How to install SageAttention in ComfyUI

last edited

On Windows, install triton-windows, add a SageAttention wheel from the woct0rdho releases, and launch ComfyUI with --use-sage-attention. The wheel author now suggests --use-ck-attention, needing no wheel. PyPI stops at 1.0.6.

1.0.21.0.31.0.41.0.51.0.62.2.0pypi stops at 1.0.6release file

Which install route fits each setup?

cu128torch2.10.0andhighercp310-abi3win_amd64toolkit major: matchlater torch: freepython 3.10 up: freewindows: matchsageattention-2.2.0+cu128...whl
setuproute
windows, 16 to 50 series cardspython_embeded\python.exe -m pip install -U "triton-windows<3.10", then one wheel file
linuxLinux source build: python setup.py install
no wheel wantedlaunch with --use-ck-attention (comfy-kitchen)

The newest wheel, from July, is tagged cu128 or cu130, torch andhigher. A later release serves RDNA4 only. Datacenter Blackwell needs a source build. Toolkit majors must match. Any Python from 3.10 works, though triton-windows raises the floor.

How can the active backend be confirmed?

starting serverusing sage attentiongot promptsagestocklog, in orderworks / kernel error

The startup log prints "Using sage attention" when the flag is accepted, or "Using Comfy Kitchen attention" for the other flag. A failed kernel call logs "Error running sage attention" and falls back. Silent slowness has another cause: /why-is-comfyui-not-using-the-gpu.

What errors appear most often?

127blackdefault kernelint8 qk, fp16 pv cuda
symptomfix
no matching version for 2.2.0PyPI lacks it (issue 336); use a wheel or source build
black or noisy output on some video modelswheels from post6 fix an overflow bug; else add PatchSageAttentionKJ with sageattn_qk_int8_pv_fp16_cuda
source build fails with toolkit 13use the prebuilt wheel (issue 319)

Is SageAttention3 or FlashAttention the better choice?

The README keeps version 3 in a Blackwell-only folder for RTX 50 cards. ComfyUI registers a sage3 option only when sageattn3 imports. Background on the tiled method: /flashattention. Per-card picks: version guide.

Sources