Cheap Memory Costs Future Compute: Co-Designing Persistent KV and GPU Execution for Efficient Streaming Video Diffusion
Organizations: The Hong Kong University of Science and Technology (ust.hk) · National University of Singapore (nus.edu)
Abstract
Block-causal video diffusion generates long videos block by block, conditioned on a persistent key-value (KV) cache. After each block is denoised, an extra noise-free () forward pass writes its clean KV into the cache; once distillation and speculative early exit make denoising cheap, this clean KV update dominates the runtime. Reusing stale KV shortens the update, but stale memory corrupts the conditioning of later blocks and inflates their denoising steps, so the saved compute reappears downstream. We present SAMR (Step-Aware Memory Reconstruction), a training-free method for frozen causal video DiTs that refreshes only part of the cache and reconstructs the rest without DiT forwards. Our key observation is that, once rotary position phases are removed, motion-aligned historical KV and the in-flight KV a token holds at its exit step are complementary estimates of its clean KV. SAMR debiases in-flight KV with offline-calibrated per-head affine maps in Pre-RoPE space, fuses the two estimates, and reserves true refreshes for tokens flagged by an attention-readout error proxy, all executed by tile-aligned, synchronization-free Triton kernels. On 48-second LongLive-1.3B videos, SAMR reduces DiT latency by 20.9% and principal FLOPs by 30.7% relative to dense KV updates, lowers downstream denoising steps, and improves final-quarter PSNR over token reuse by 1.61 dB (1.14 dB on held-out VidProM-16). The reconstruction also transfers to frozen Self-Forcing-DMD-1.3B: zero-shot, it reduces reuse-induced step inflation ( steps/token) and improves late PSNR by dB, and a one-time training-free calibration recovers the diagnostic score that zero-shot transfer lowers ().
Figures & tables
| DiT Execution, Compute & Memory Actions | Ref.-Trajectory Agreement (Q4) | No-Ref. CLIP | ||||||||||
| Method | DiT | Spd. | TFLOPs | Steps | Ref. | Rec. | PSNR | Sat. | Flk. | Mot. | Anc. | Text |
| (s) | vs. Full | /vid | /tok | (%) | (%) | (dB) | (%) | (%) | (%) | (CLIP) | (CLIP) | |
| (a) Primary 48-second suite ( Main 15 3 : 45 paired rollouts, LongLive-1.3B, U-shaped BF16 engine) | ||||||||||||
| Full memory (reference) | 34.71 | 1.00 | 4041 | 1.78 | 100.0 | 0.0 | – | – | – | – | 0.877 | 0.334 |
| Eventful reuse | 30.13 | 1.15 | 3242 | 1.87 | 24.6 | 0.0 | 13.87 | 11.17 | 23.82 | 23.03 | 0.856 | 0.334 |
| Calibrated assimilation | 29.43 | 1.18 | 3013 | 1.72 | 24.6 | 38.9 | 14.92 | 7.99 | 20.63 | 18.73 | 0.860 | 0.337 |
| Execution | No-Ref. Quality Diagnostics | Ref.-Trajectory Agreement | |||||||
| Method | DiT | Steps | Ref. | Diag. | Subj. | Smooth. | SSIM | AlexD. | PSNR |
| (s) | /tok | (%) | (comp.) | (%) | (%) | (norm.) | (dB) | ||
| (a) LongLive-1.3B, 48 s / 765 frames (8 prompts, uniform-cache engine) | |||||||||
| Full memory (12f ref.) | 43.00 | 1.73 | 100.0 | 93.56 | 90.25 | 97.40 | 1.000 | 0.000 | – |
| Periodic dense reset ( ) | 35.05 | 1.89 | 23.8 | 91.76 | 89.18 | 96.49 | 0.541 | 0.809 | 14.85 |
| Eventful reuse | 37.70 | 1.94 | 24.6 | 92.10 | 89.10 | 96.70 | 0.529 | 0.831 | 13.89 |
| Variant | Steps | PSNR | AlexD. | Diag. | |
|---|---|---|---|---|---|
| /tok | (dB) | (dB) | |||
| Dense | 1.77 | 22.602 | – | 0.289 | 94.01 |
| Dense | 1.78 | 21.911 | – | 0.297 | 93.84 |
| Reuse (baseline) | 1.85 | 16.866 | – | 0.608 | 93.29 |
| w/o age + reuse sel. | 1.96 | 16.575 | -0.463 | 0.631 | 92.48 |
| Reference (with context) | 1.91 | 17.038 | 0.000 | 0.609 | 93.12 |
| Variant | DiT | Route | Steps | Ref. | PSNR | Flk. |
|---|---|---|---|---|---|---|
| (s) | (ms) | /tok | (%) | (dB) | (%) | |
| Eventful reuse | 30.12 | 209 | 1.87 | 24.6 | 13.87 | 23.8 |
| + Step fusion | 29.44 | 215 | 1.72 | 24.6 | 14.92 | 20.6 |
| + Risk rank | 28.91 | 273 | 1.66 | 24.6 | 15.18 | 19.4 |
| + 21-plan (KV) | 28.58 | 754 | 1.65 | 17.8 | 15.15 | 19.9 |
| + Readout (Py) | 28.18 | 765 | 1.58 | 24.7 | 15.47 | 23.5 |
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
| Metric (SAMR reuse) | Mean | interval | Better on |
|---|---|---|---|
| DiT time (s) | |||
| Q4 PSNR (dB) | |||
| Q4 saturation drift (%) | – | ||
| Q4 flicker drift (%) | – | ||
| Q4 motion drift (%) | – |
| Pipeline | GPU | First | Gap | Wall | Spd. | GPU s | FPS |
|---|---|---|---|---|---|---|---|
| (s) | (s) | (s) | vs. Full | ||||
| Full (serial) | 1 | – | – | 70.22 | 1.00 | 70.2 | 10.96 |
| Reuse (serial) | 1 | – | – | 66.18 | 1.06 | 66.2 | 11.64 |
| SAMR serial | 1 | 0.903 | 0.982 | 63.23 | 1.11 | 63.2 | 12.14 |
| SAMR async | 1 | 1.256 | 0.909 | 58.98 | 1.19 | 59.0 | 13.03 |
| SAMR P2P | 2 | 1.096 | 0.576 | 37.79 | 1.86 | 75.6 | 20.25 |
| Precision | Role | PSNR | SSIM | AlexD. | Flk. | Diag. |
|---|---|---|---|---|---|---|
| (quant.) | (dB) | (norm.) | (%) | (comp.) | ||
| FP8 ( e4m3 ) | KV update | 19.14 | 0.717 | 0.427 | 7.7 | 94.10 |
| Denoise | 15.57 | 0.560 | 0.749 | 10.8 | 93.90 | |
| W4A8 (g128) | KV update | 16.10 | 0.596 | 0.656 | 19.3 | 93.68 |
| Denoise | 12.14 | 0.396 | 1.175 | 23.5 | 93.74 | |
| W4A4 (g128) | KV update | 14.93 | 0.549 | 0.775 | 23.8 | 93.40 |
| HeldOut-16 (189f) | VidProM-64 (64 clips) | Long-64 (765f / 48 s) | SFD-1.3B (16 clips) | |||||||||
| Optimization Stage | DiT | Spd. | Diag. | DiT | Spd. | Diag. | DiT | Spd. | Diag. | DiT | Spd. | Diag. |
| L0: 4-step dense DiT (BF16) | 15.68 | 1.00 | 93.36 | 15.69 | 1.00 | 94.66 | 65.30 | 1.00 | 92.95 | 15.70 | 1.00 | 91.86 |
| L1: + Speculative token early exit | 10.13 | 1.55 | 93.90 | 10.33 | 1.52 | 94.21 | 41.12 | 1.59 | 93.76 | 11.30 | 1.39 | 92.13 |
| L2: + U-shaped + chained KV | 8.72 | 1.80 | 94.30 | 8.87 | 1.77 | 94.28 | 34.42 | 1.90 | 93.43 | – | – | – |
| L3a: + Eventful reuse ( ) | 7.68 | 2.04 | 93.40 | 7.61 | 2.06 | 94.26 | 29.99 | 2.18 | 92.37 | 8.64 | 1.82 | 92.19 |
| L3b: + Pre-RoPE recon. ( ) | 7.65 | 2.05 | 93.90 | 7.70 | 2.04 | 94.21 | 29.37 | 2.22 | 93.12 | – | – | – |
| DiT Execution, Compute & Memory Actions | Ref.-Trajectory Agreement (Q4) | No-Ref. CLIP | ||||||||||
| Method | DiT | Spd. | TFLOPs | Steps | Ref. | Rec. | PSNR | Sat. | Flk. | Mot. | Anc. | Text |
| (s) | vs. Full | /vid | /tok | (%) | (%) | (dB) | (%) | (%) | (%) | (CLIP) | (CLIP) | |
| SAMR (ours) | 27.47 | 1.26 | 2799 | 1.58 | 24.7 | 45.2 | 15.47 | 8.70 | 23.46 | 22.81 | 0.865 | 0.340 |
| Recalibrated / KV | 28.63 | 1.21 | 2944 | 1.71 | 20.9 | 41.4 | 14.75 | 8.16 | 21.46 | 19.57 | 0.866 | 0.336 |
| Recalibrated / readout | 28.07 | 1.24 | 2868 | 1.68 | 17.6 | 43.6 | 14.50 | 8.71 | 22.30 | 20.71 | 0.866 | 0.339 |
| Predictive Step-1 variant | 25.01 | 1.39 | 2385 | 1.39 | 15.5 | 36.1 | 14.35 | 12.30 | 27.25 | 27.45 | 0.869 | 0.337 |
| Execution | No-Ref. Quality Diagnostics | Ref.-Trajectory Agreement (12f Dense) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Method | DiT | Steps | Ref. | Diag. | Subj. | Smooth. | SSIM | AlexD. | PSNR | Sat. |
| (s) | /tok | (%) | (comp.) | (%) | (%) | (norm.) | (dB) | (%) | ||
| Full memory (12-frame ref.) | 43.00 | 1.73 | 100.0 | 93.56 | 90.25 | 97.40 | 1.000 | 0.000 | – | 0.0 |
| Periodic dense reset ( ) | 35.05 | 1.89 | 23.8 | 91.76 | 89.18 | 96.49 | 0.541 | 0.809 | 14.85 | 21.9 |
| Eventful reuse | 37.70 | 1.94 | 24.6 | 92.10 | 89.10 | 96.70 | 0.529 | 0.831 | 13.89 | 19.3 |
| Eventful reuse ( budget) | 39.35 | 1.88 | 49.2 | 92.45 | 89.59 | 97.25 | 0.567 | 0.736 | 15.56 | 7.9 |
| Execution | No-Ref. Quality Diagnostics | Ref.-Trajectory Agreement | |||||||
|---|---|---|---|---|---|---|---|---|---|
| Method | DiT | Steps | Ref. | Diag. | Subj. | Smooth. | SSIM | AlexD. | PSNR |
| (s) | /tok | (%) | (comp.) | (%) | (%) | (norm.) | (dB) | ||
| Full memory (reference) | 11.73 | 2.22 | 100.0 | 92.58 | 91.06 | 96.89 | 1.000 | 0.000 | – |
| No clean KV update ( ) | 8.59 | 2.13 | 0.0 | 90.48 | 90.11 | 95.59 | 0.548 | 0.881 | 14.45 |
| Periodic dense reset ( ) | 9.53 | 2.25 | 20.0 | 90.91 | 90.74 | 96.83 | 0.564 | 0.856 | 14.40 |
| Eventful reuse | 10.65 | 2.47 | 24.6 | 91.16 | 89.87 | 96.99 | 0.577 | 0.817 | 14.28 |
| Variant ( refresh unless noted) | DiT | Steps | PSNR | PSNR | PSNR | SSIM | AlexD. | Diag. | Sat. |
| (s) | /tok | (dB) | vs. ref. | (dB) | (norm.) | (comp.) | (%) | ||
| Dense, block-1 noise (100% refresh) | 10.72 | 1.77 | 22.602 | – | 20.38 | 0.810 | 0.289 | 94.01 | 4.2 |
| Dense, block-1 noise (100% refresh) | 10.69 | 1.78 | 21.911 | – | 19.65 | 0.802 | 0.297 | 93.84 | 6.1 |
| Eventful reuse (baseline) | 9.08 | 1.85 | 16.866 | – | 15.57 | 0.625 | 0.608 | 93.29 | 7.2 |
| w/o age tracking + reuse-style selection | 9.76 | 1.96 | 16.575 | -0.463 | 15.14 | 0.630 | 0.631 | 92.48 | 11.4 |
| Reference estimator (with context term) | 9.68 | 1.91 | 17.038 | 0.000 | 15.89 | 0.638 | 0.609 | 93.12 | 8.6 |
| Single-variable change | DiT | DiT | PSNR | PSNR | Flicker | Flk | Decision |
|---|---|---|---|---|---|---|---|
| (s) | (s) | (dB) | (dB) | (%) | (pts) | ||
| SAMR (locked policy) | 30.11 | – | 15.55 | – | 18.01 | – | Keep |
| Layer-balanced risk | 30.40 | +0.29 | 15.11 | -0.44 | 14.65 | -3.36 | Reject |
| Count hysteresis | 30.23 | +0.11 | 15.60 | +0.05 | 19.59 | +1.58 | Reject |
| Action downgrade | 30.08 | -0.04 | 15.56 | +0.01 | 20.35 | +2.34 | Reject |
| Step-1 reliability skip | 26.78 | -3.34 | 15.07 | -0.48 | 30.82 | +12.81 | Reject |
Diffusion Model Inference Acceleration
Diffusion model inference acceleration reduces the time and compute needed to generate or reconstruct outputs while preserving quality.
See all 567 papers