TL;DR
In streaming video generation, taking shortcuts on memory updates seems like an easy way to save time—until that "stale" memory confuses the model later, forcing it to work harder on future frames and causing bizarre visual ghosting. This paper introduces SAMR, a training-free technique that smartly reconstructs clean memory on the fly from signals already sitting in GPU memory. The result is a system that cuts compute by over 30% and speeds up 48-second video generation by 21%, without sacrificing visual coherence.
What Problem Does This Paper Address?
Generating minute-long videos with diffusion transformers (DiTs) usually happens block by block, much like how an LLM generates text. To keep characters and backgrounds consistent over tens of seconds, each new block of frames looks back at a persistent Key–Value (KV) cache—the model’s working memory.
Here’s the catch: denoising frames happens on noisy data, and thanks to modern tricks like distillation and "speculative early exit" (stopping compute on pixels that have already settled), denoising itself has become remarkably fast. However, before moving to the next block, the model must run an extra, noise-free ($t=0$) forward pass just to write clean KV entries into the cache. This "clean KV update" now eats up nearly 60% of total runtime.
Why not just refresh a fraction of the tokens and reuse old, stale KV for the rest? Because streaming generation is a closed loop. Stale memory corrupts the conditioning for future blocks, causing tokens to converge slower. This inflates downstream denoising steps—meaning the compute you saved upfront comes right back to haunt you later, alongside creepy visual artifacts like duplicated silhouettes and distorted fingers.
Methods
The authors propose SAMR (Step-Aware Memory Reconstruction), a drop-in, training-free method for frozen video DiTs. Instead of choosing strictly between an expensive refresh or stale reuse, SAMR introduces a middle ground: reconstructing clean KV entries without running the heavy transformer layers.
It consists of three co-designed pieces:
- Step-Aware Pre-RoPE Reconstruction: Before updating the cache, two imperfect estimates of a token's clean KV already live in GPU memory: (a) historical KV from a motion-matched patch in the previous block (clean, but fails when new objects appear), and (b) in-flight KV from when the token exited denoising early (up-to-date geometry, but shifted by step-dependent noise). SAMR strips away 3D rotary position encodings (RoPE) so positions don't clash, applies tiny offline-calibrated linear maps to debias the in-flight KV, and fuses the two estimates—locking static patches to clean history while letting disoccluded areas track new content.
- Readout-Guided Refresh Selection: True $t=0$ refreshes are reserved only for tokens where reconstruction errors would actually alter what future attention layers read (like newly exposed foreground objects), estimated via a first-order attention-readout error proxy that tracks staleness.
- Hardware-Aligned Execution: Sparse token operations notoriously bottleneck GPUs due to Python routing overhead and awkward matrix sizes. SAMR snaps refresh counts to GPU tile multiples ($\Delta_m = 256$), compresses middle-layer caches into a "U-shaped" ring buffer, and fuses patch matching, plan scoring, and Pre-RoPE math into synchronization-free Triton kernels.
Datasets
SAMR requires no training, only a tiny one-time offline calibration:
- Dev-8: 8 prompts used strictly to fit the closed-form Pre-RoPE linear maps, risk tables, and latency model.
- Main 15×3: The primary evaluation suite consisting of 15 prompts across 3 random seeds (45 noise-paired 48-second video rollouts).
- VidProM-16 & HeldOut-16: Held-out prompt pools (drawn from the existing VidProM dataset and internal splits, completely excluded from calibration) used to validate generalization on 48-second and 12-second streams.
Key Insights and Ideas
- "Cheap memory costs future compute": You cannot budget memory compression in isolation. In autoregressive early-exit systems, sloppy memory writes directly penalize future reads by delaying convergence.
- Free lunches in Pre-RoPE space: Once you invert rotary positional phases, historical KV and noisy in-flight KV become complementary estimators. Blending them with a clipped hinge rule prevents noisy jitter from leaking into static backgrounds—something standard minimum-variance (BLUE) estimators fail to do.
- A 144× compute return on investment: Spending a microscopic amount of math on per-head Pre-RoPE projections (3.09 TFLOPs per video) saves 446.9 TFLOPs of downstream denoising compared to naive token reuse.
Key Results
Tested on frozen LongLive-1.3B generating 48-second (765-frame) videos on AMD GPUs:
- Speed & Compute: SAMR cuts principal FLOPs by 30.7% and reduces DiT latency by 20.9% ($34.71\text{ s} \to 27.47\text{ s}$, a $1.26\times$ speedup) compared to full dense updates.
- Reversing Step Inflation: While naive token reuse inflates denoising from $1.78$ to $1.87$ steps/token, SAMR drops it to $1.58$ steps/token—even lower than full memory!
- Visual Fidelity: SAMR beats token reuse by +1.61 dB in final-quarter PSNR (+1.14 dB on held-out VidProM-16), eliminating late-horizon ghosting on hands and moving figures.
- Cross-Backbone Transfer: Applied zero-shot to a second frozen model (Self-Forcing-DMD-1.3B), SAMR immediately curbs step inflation ($2.47 \to 2.30$). A quick, training-free in-domain recalibration restores reference-free diagnostic scores ($91.10$), reaching 16.32 dB PSNR when stacked with adaptive budgeting.
Limitations and Future Work
The authors candidly note a few boundaries:
- First-order approximations: The attention-readout risk table is an offline heuristic proxy rather than a strict mathematical error bound.
- Calibration across backbones: While zero-shot transfer speeds up a new model, recovering peak diagnostic visual quality requires running a one-time (though training-free) calibration pass for that specific backbone's modulation shifts.
- Evaluation scope: Experiments focus on 1.3B-parameter models running on AMD GPUs, and rely on trajectory PSNR and composite diagnostics rather than standard LPIPS, FVD, VBench-Long, or human user studies.
Summary updated