Abstract
Generating high-quality video using 3D Diffusion Transformers (DiTs) is computationally expensive due to the quadratic complexity of full attention and the iterative nature of diffusion sampling. Efficient-vDiT introduces a novel "Attention Tile" discovery—the observation that video attention maps are remarkably repetitive and data-independent. By leveraging this insight through a three-stage optimization pipeline involving multi-step consistency distillation, layer-wise sparsity search, and knowledge distillation, Efficient-vDiT achieves up to a 7.8× speedup in video generation while maintaining high visual fidelity.
Introduction
State-of-the-art video generation models, such as Sora and Open-Sora-Plan, utilize 3D Diffusion Transformers. These models employ "3D full attention," treating every spatial and temporal token as part of a single massive sequence. While effective, this approach suffers from two primary inefficiencies:
- Quadratic Complexity: Computational costs scale quadratically with the number of video frames ($O(N^2)$), making high-resolution, long-duration video generation prohibitively slow.
- Sampling Overhead: Standard diffusion requires hundreds of iterative steps, compounding the cost of the already heavy 3D attention layers.
Efficient-vDiT addresses these challenges by sparsifying the attention mechanism and streamlining the sampling process.
The "Attention Tile" Phenomenon
The researchers identified a "tile-style" repetitive pattern in 3D attention maps. Their analysis revealed several key properties that allow for significant optimization:
- Diagonal Dominance: Attention weights on the diagonal (where frames attend to themselves) are approximately 2.8× higher than off-diagonal weights.
- Locality and Global Context: While nearby frames are crucial for temporal smoothness, a small set of "global reference frames" is sufficient to maintain long-term consistency.
- Data Independence: Strikingly, these attention patterns remain stable across different prompts and content types, suggesting that a fixed sparse mask can be effective.
The Efficient-vDiT Pipeline
To transform a standard pre-trained DiT into an efficient generator, the authors propose a three-stage pipeline:
- Multi-Step Consistency Distillation (MCD): To reduce sampling steps without sacrificing quality, the diffusion trajectory is split into segments. This allows the model to generate high-quality videos in as few as 20 steps.
- Layer-wise Sparsity Search: Utilizing the "Attention Tile" insight, an algorithm searches for the optimal sparse mask for each layer. This reduces attention complexity from quadratic to linear ($O(N)$).
- Knowledge Distillation: A final fine-tuning stage uses the original dense model as a "teacher" to help the sparse "student" model recover any performance lost during sparsification.
The implementation uses FlexAttention (PyTorch 2.5), which enables hardware-level acceleration by skipping the computation of masked-out regions.
Experimental Results
Efficient-vDiT was evaluated on benchmarks like VBench and Panda-70M, using the Open-Sora-Plan-1.2 and CogVideoX-5B models as bases.
- Speedup: The method achieved a 7.4× speedup for 29-frame videos and a 7.8× speedup for 93-frame 720p videos.
- Quality: On the VBench suite, the accelerated model's scores remained within 1% of the original dense model, indicating minimal loss in visual quality or physical consistency.
- Efficiency: The entire optimization process required only 0.1% of the original pre-training data, making it highly practical for accelerating existing large-scale models.
- Scalability: The method scales near-linearly in distributed environments, achieving a 3.91× speedup on 4 GPUs using Sequence Parallelism.
Conclusion
Efficient-vDiT demonstrates that the massive redundancy in 3D attention maps can be exploited to significantly accelerate video generation. By combining structural sparsity with consistency distillation, the framework provides a "plug-and-play" solution for making large-scale video transformers more accessible and efficient. Future work may explore further integration with quantization and architectural pruning to push the boundaries of real-time high-resolution video synthesis.
Summary updated