TL;DR
CalibAtt is a training-free method that accelerates text-to-video diffusion transformers by exploiting the inherent, data-independent sparsity and spatial repetition in spatiotemporal attention maps. By performing a one-time offline calibration pass to precompute block-sparse masks and spatial anchor rows, CalibAtt achieves up to a 1.58× end-to-end inference speedup with negligible impact on video quality or text alignment.
What Problem Does This Paper Address?
State-of-the-art text-to-video generation relies heavily on large Diffusion Transformers (DiTs). However, generating high-resolution, high-frame-rate videos requires processing massive token sequences. The core bottleneck is the spatiotemporal self-attention mechanism, which scales quadratically ($O(N^2)$) with sequence length.
While hardware-level optimizations like FlashAttention mitigate memory constraints, they do not reduce the raw number of multiply-accumulate operations. Existing algorithmic solutions to introduce sparsity typically fall into two camps: they either require expensive model fine-tuning or rely on dynamic, online profiling during inference. Online methods introduce significant computational overhead, which often diminishes their practical speedup—especially in modern, few-step distilled video models where every millisecond counts.
Methods
CalibAtt introduces a completely training-free, offline calibration framework that generates static attention optimization instructions before inference ever begins. The method relies on a key observation: attention patterns in video models are highly sparse and remain remarkably consistent across different text prompts and initial noise vectors.
The CalibAtt pipeline consists of two primary components executed during an offline calibration phase:
-
Energy-Based Block Mask Calibration: The attention matrix is tiled into hardware-friendly blocks (e.g., $128 \times 128$). For a set of calibration prompts, CalibAtt calculates the "energy" (accumulated attention mass) of each block. It retains only the minimum number of blocks needed to meet a timestep-dependent energy threshold $\epsilon(t)$, setting the rest to zero. These masks are averaged across prompts and binarized using an agreement threshold ($\rho$).
-
Spatial Repetition Detection: The authors observed that certain attention heads exhibit highly repetitive patterns across spatial rows within a video frame. For these specific heads, CalibAtt selects a small number of equispaced "anchor rows" to compute attention densely, and then broadcasts the output to neighboring rows, bypassing full computation.
Efficient Implementation
At inference time, the precomputed block masks are compiled into read-only skip lists passed directly to a custom CUDA kernel built on top of FlashAttention3. This allows the GPU to completely skip unselected blocks in a hardware-efficient manner without any dynamic scheduling overhead.
Datasets
- Calibration: A small subset of 64 prompts sampled from MovieGenBench was used to compute the offline attention masks and spatial similarity scores.
- Evaluation: The method was rigorously evaluated using the official prompt suite and metrics of VBench, a comprehensive benchmark for video generative models.
- Models Tested: The authors validated their approach across multiple architectures: Wan 2.1 (14B) at 480p and 720p resolutions, Mochi 1 (10B) at 480p, and LightX2V (a 4-step distilled variant of Wan 2.1).
Key Insights and Ideas
- Bimodal Sparsity Distribution: When aggregating attention masks across diverse prompts, the block keep-rate distribution is strongly bimodal. Blocks are either almost always computed or almost always skipped, proving that spatiotemporal attention structure is largely data-independent and driven by the model's architecture rather than the input prompt.
- Complementarity of Sparsity and Repetition: Attention maps that exhibit high spatial row repetition tend to have low block sparsity, and vice versa. By combining block-skipping with spatial row broadcasting, CalibAtt targets both types of redundancy effectively.
- Timestep Scheduling Matters: Applying aggressive sparsification too early in the denoising process degrades video quality. CalibAtt uses an exponential schedule that keeps attention dense during early, high-noise timesteps and introduces higher sparsity in later steps.
Key Results
CalibAtt was compared against strong training-free baselines, including FlashAttention3 (Dense), RadialAttention, SparseVideoGen2 (SVG2), and SpargeAttention.
- Speedup & Sparsity: On Wan 2.1 14B (720p), CalibAtt achieved a 1.58× end-to-end speedup and 62.5% attention sparsity. On the 4-step distilled LightX2V model, it achieved a 1.57× speedup, outperforming online methods like SVG2, which actually slowed down inference due to clustering overhead.
- Quality Preservation: Across all configurations, CalibAtt maintained VBench quality and semantic consistency scores comparable to the slower, fully dense baseline.
Limitations and Future Work
- Static Mask Limitations: Because the masks are computed offline and are data-independent, CalibAtt cannot exploit dynamic, prompt-specific sparsity that might emerge during unique generation tasks.
- Memory Overhead: Storing unique skip lists for every layer, head, and timestep requires significant VRAM (up to 21.5 GB for Wan 2.1 at 720p). Although the authors introduced a "timestep mask sharing" technique that successfully compressed this footprint down to 3.6 GB with minimal sparsity loss, memory optimization remains a key area for improvement.
- Future Directions: The authors suggest extending the calibration framework to exploit cross-timestep correlations (temporal redundancy between consecutive frames) and exploring more compact 1D skip-list representations to further reduce memory overhead.
Summary updated