Nodes/Piper/Piper SageAttention2++
ComfyUI Node

Piper SageAttention2++

SageAttention2 minus the Windows Triton trauma

By Boffee·Created about a month ago·Updated 28 days ago· 0
Piper SageAttention2++
  • model
  • model

If you've spent any time in Wan or video workflows, you know SageAttention - it's the memory-efficient attention that shows up in every "make Wan faster" thread, the thing that turns a slow long-clip render into something you can actually sit through. Piper SageAttention2++ is a model patch node that drops SageAttention2 into your ComfyUI graph as one wire: MODEL in, MODEL out, no widgets. It's the second node in Boffee's piper-nodes pack, and it's effectively the "for modern GPUs" sibling of the pack's plain Piper Attention node.

Same pitch, different audience: on every compatible attention call, the node swaps in the SageAttention2++ backend from the piper-kernels library, and falls back to ComfyUI's existing attention when the call doesn't fit. The "++" is piper-kernels' own take on SageAttention2 (thu-ml's project) - the same low-bit, memory-efficient attention, packaged the way one author wants it shipped, and on Windows that packaging is the whole point.

How it works

Same machinery as its sibling, different gate. The override is installed through the optimized_attention_override seam - the same hook ComfyUI and Kijai's nodes use - and it engages only when the device is CUDA with compute capability 8.9 or newer: RTX 40-series, RTX 50-series, and Hopper data-center cards. RTX 30-series (8.6) misses the cut, so on a 30-series this node is a silent no-op. The rest of the contract is shared with Piper Attention: fp16/bf16 only, head dimensions 64 or 128, no attention mask, no grouped-query attention, low-precision attention enabled, no training. Anything else delegates back to whatever attention ComfyUI had selected - and if another model node already installed an override, that becomes the fallback instead of being overwritten. Kernel errors aren't swallowed, so a crash is a real crash, not a mysterious slow-down.

Inputs and outputs

Two sockets, that's the whole node:

  • model (MODEL, required) - from your loader or the previous patch node.
  • Output model (MODEL) - into your sampler.

It patches a clone of the model patcher, so the loader's output stays clean. Route one branch through this node and one not, lock the seed, and you'll see exactly what SageAttention2++ is buying you - often nothing visible in the image, but a lot in VRAM and seconds.

Installing it

Identical to the rest of the pack - ComfyUI Manager (search "piper-nodes") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Boffee/piper-nodes
cd piper-nodes && python -m pip install -r requirements.txt

then restart. The single dependency, piper-kernels[triton], selects triton-windows on Windows - and that's the actual headline here, because SageAttention's notorious blocker has always been Triton on Windows. For a long stretch, the only reason it worked on Windows at all was one community maintainer (woctordho) hand-building wheels. Having that resolve automatically is genuinely the nicest thing this pack does. The catches: Python 3.13+ required (a 3.11/3.12 ComfyUI fails at install), and AMD users get a no-op node.

Common issues

  • On a 30-series, nothing happens. By design - capability 8.9+ means 40/50-series. Reach for the pack's plain Piper Attention node there instead.
  • It's not free quality. SageAttention2 is low-bit, quantized attention, and the community consensus is that it trades a little fidelity for the VRAM and speed - there are threads on it visibly affecting image quality. Z-Image Base is the documented worst case: patchy/blurry output, matrix-code-style lines, sometimes fully black, confirmed across 3090/4090/5090. If a model looks subtly wrong with this node in the path, bypass it and compare on a fixed seed before you blame anything else.
  • Video is where it earns its keep. For Wan and other long-sequence work, the VRAM savings are the point - it's the lever the community points at when a 24GB card chokes on 720p, and the same kernel family behind the 100-200x claims you see attached to distilled video pipelines.
  • Not sure it engaged? Silent fallback is the design. Watch iter time and VRAM on a 40/50-series fp16 workflow - the change is measurable even when the image looks identical.
CategoryPiper/Kernels/Attention

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
modelMODEL