Nodes/ComfyUI-FlashVSR-Stock/FlashVSR One-Step Sampler
ComfyUI Node

FlashVSR One-Step Sampler

A ComfyUI node in FlashVSR/sampling with 10 inputs and 2 outputs.

By Pizzawookiee·Created 14 days ago·Updated 4 days ago· 2
FlashVSR One-Step Sampler
  • runtime
  • SAMPLER
  • SIGMAS
sampling_modefull_video_dense
sparse_ratio2.0
local_range11
query_block_chunk1
new_latent_frames2
profile_cuda_eventsfalse
qkv_projectionstock
cache_formatint8
cache_residency_backendcpu
CategoryFlashVSR/sampling

Inputs (10)

NameTypeDefaultDescription
runtimeFLASHVSR_RUNTIME
sampling_modeCOMBOfull_video_densefull_video_dense processes the complete clip in one dense-attention model call: useful as a reference but VRAM grows sharply with resolution and duration; the LCSA controls below are ignored. streaming processes bounded overlapping segments and applies FlashVSR LCSA without a DiT KV cache. streaming_faithful_full uses the paper layout: six-frame prefill, two new frames per continuation, and a six-frame sliding KV cache in every Wan block. Cache precision and CPU/GPU residency are configured independently below. streaming_faithful_lowvram uses the same temporal layout but retains only the nearest two historical frames in every Wan block. This avoids the boundary blur caused by giving early blocks no temporal history while using roughly one third of the full cache. Streaming modes use the model's selected mask-capable attention backend. The optional FlashVSR Sparge Attention additionally skips rejected key blocks with SpargeAttn instead of applying the sparse topology through a dense masked kernel.
sparse_ratioFLOAT2.01–4Streaming-only LCSA top-k block-pair budget. Higher values retain more attention connections and usually improve motion/detail stability; lower values are more aggressive and may look sharper but can flicker or lose structure. 2.0 is the stable default. With the current dense mask backend this is mainly a quality control, not a major speed or VRAM control.
local_rangeINT113–15Streaming-only spatial search neighborhood measured in 8x8 Wan-token windows (about 128 output pixels per window). Larger values better accommodate fast or large motion; smaller values keep attention more local and may look sharper but can destabilize moving objects. 11 is the stable default.
query_block_chunkINT10–32Number of 128-query LCSA windows sent to the selected backend at once. 0 selects a conservative value from currently free VRAM; 1 minimizes mask VRAM; larger manual values are faster but use more VRAM. This control is ignored by FlashVSR Sparge Attention, which processes the complete compact block mask in one sparse call.
new_latent_framesoptINT22–4New latent frames appended per continuation. 2 matches the FlashVSR paper and is mandatory in both faithful cache modes. Legacy streaming may use 4 to reduce model calls, but this is less faithful to the trained temporal layout.
profile_cuda_eventsoptBOOLEANfalsePrint synchronized CUDA-event timings after sampling for LQ transfers, pixel unshuffle, Conv3d, norm/SiLU, cache updates and linear projection; asynchronous cache write enqueue/D2H/waits; shared ConvRot quantization, Q/K/V GEMMs, Q/K norm/RoPE; complete Wan calls; compact-cache transfer, K-summary build/transfer, direct HND dequantization, current HND layout, and native Sparge block-INT8 K/transposed-FP8 V preparation; LCSA routing; Sparge input cast, K smoothing, Q/K quantization, LUT creation, V transpose/FP8 quantization, CUDA attention, and restore; and result assembly. It also prints LQ weight residency and verifies BasicGuider/CFG=1 pass count. Off adds no CUDA events; on is intended for benchmarking.
qkv_projectionoptCOMBOstockstock uses ComfyUI's proven Wan Q/K/V Linear calls and still uses an INT8 ConvRot checkpoint normally. shared_int8_experimental reuses one ConvRot activation quantization across Q/K/V; it is capability-guarded but remains experimental. It does not control cache size.
cache_formatoptCOMBOint8Faithful modes only. int8 stores post-RoPE K and V as independent per-token/per-head INT8 carriers (smallest). With FlashVSR Sparge Attention, v0.33 routes from cached K summaries and expands carriers directly into final HND layout, avoiding full FP16 staging tensors. hybrid keeps K in model precision and stores V as INT8 to protect attention scores. float keeps both in model precision (largest). This is independent of QKV projection and checkpoint dtype.
cache_residency_backendoptCOMBOcpuFaithful modes only. cpu always stages the authoritative cache from system RAM and is the reliable fallback. aimdo_experimental keeps the same authoritative CPU cache while exposing a dedicated low-priority AIMDO VBAR as an evictable GPU mirror. Resident pages avoid CPU transfers; evicted, stale, or unavailable pages are repopulated from CPU per access. Requires ComfyUI AIMDO.

Outputs (2)

NameTypeDescription
SAMPLERSAMPLER
SIGMASSIGMAS