Nodes/ComfyUI-FlashVSR-Stock/FlashVSR Kitchen Sparse Attention
ComfyUI Node

FlashVSR Kitchen Sparse Attention

FlashVSR's sparse attention without the SpargeAttn wheel — if you're on Windows

By Pizzawookiee·Created 27 days ago·Updated 2 days ago· 2
FlashVSR Kitchen Sparse Attention
  • model
  • MODEL

FlashVSR upscaling is already the pick for "video source is decent, just make it bigger and faster than SeedVR2" - this pack is the community build that runs it on ComfyUI's stock Wan, and this node is its low-VRAM secret weapon for people stuck on small NVIDIA cards. FlashVSRKitchenSparseAttention is the sibling to FlashVSR Sparge Attention: instead of needing the separately-pip-installed SpargeAttn wheel, it executes FlashVSR's exact 128-query × 128-key sparse attention mask through the native INT8 "Comfy-Kitchen" kernel that ships in Zironic/H3-Optimizations. No wheel, no extra H3 Python custom node - just one DLL copied into the right folder.

Here's the context that makes it worth caring about. FlashVSR's streaming modes keep a sliding cache of past K/V tensors in every Wan block so the model remembers temporal context without re-seeing the whole clip. Store that cache in fp16 and a 6 GB card chokes; store it as INT8 and it's cheap. That faithful INT8 cache is exactly what this node is built to eat: it repacks cached K and V into bounded 128-row slabs and feeds them straight into the native kernel, skipping the full-precision reconstruction that a plain dense backend would force. The README sums up the payoff as fewer BF16/FP16 intermediates and better streamed execution - which, on a 6 GB card, is the difference between finishing a 2x upscale of a 10-second clip in about five minutes and swapping to desktop.

What it does in the graph

The whole node is one model patch. It takes your loaded FlashVSR Wan model in, clones it, and attaches the Kitchen backend as FlashVSR's private sparse route - exactly the same seam the Sparge node uses. That matters more than it sounds:

  • Dense self-attention, cross-attention, and full_video_dense still run through your ComfyUI attention backend. The Kitchen kernel only executes FlashVSR's streaming LCSA mask, so you don't lose whatever backend you've configured.
  • Patch order doesn't matter. Slap it on the model after the loader and before Configure FlashVSR Upscaling runs the sampler - that's the whole install.

Inputs and outputs are as minimal as it gets: one model (MODEL) in, one MODEL out. Nothing to tune. You are not missing parameters - the sparse-ratio knob lives on the sampler, not here.

Installing it

It ships inside the pack, so install the pack itself first - via ComfyUI Manager (search "ComfyUI FlashVSR Stock Wan") or:

cd ComfyUI/custom_nodes
git clone https://github.com/Pizzawookiee/ComfyUI-FlashVSR-Stock.git
cd ComfyUI-FlashVSR-Stock
python -m pip install -r requirements.txt

Then the one thing this node actually needs, which the pack will never download for you:

# Copy the DLL from the H3-Optimizations repo's native/bin into:
ComfyUI/models/flashvsr/h3_int8_attention_v5.dll

The loader prefers h3_int8_attention_v5.dll, then h3_int8_attention.dll. Restart ComfyUI afterward. And read the fine print: the code loads a .dll by name through ctypes, which in practice makes this the Windows / RTX 4000-series (SM89) route. That's the project's tested target; everything else is explicitly "untested by this project." On Linux, you're better off with the Sparge route or a mask-capable dense backend.

When it bites

The good kind of failure: if the DLL is missing, the node raises a FileNotFoundError the moment the graph runs, listing exactly where it looked - not five minutes into sampling. Watch for three things:

  • Wrong ABI. The adapter expects ABI version 4 and checks it on load; an incompatible build fails fast with a clear message. Use a current H3-Optimizations release.
  • It only helps streaming modes. Pair it with streaming_faithful_lowvram (or streaming_faithful_full) so there's an INT8 cache to feed. Run streaming or full_video_dense and the node is a no-op - dense fallback ignores it.
  • CUDA only. ROCm/HIP is rejected outright.

If the sparse route gives you trouble, pull the node out of the graph and use a mask-capable attention backend; the workflow degrades gracefully to dense streaming.

CategoryFlashVSR/model_patches

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
MODELMODEL