VSA: Faster Video Diffusion with Trainable Sparse Attention

Pei-Yuan Zhang, Yongqi Chen, Hao-Feng Huang, Will Lin, Zhengzhong Liu +3 more
5/1/2025
127 citations
diffusion-flow

Official code: hao-ai-lab/FastVideo (4,835 stars, Python, Apache-2.0, last commit 2026-04-29).

Abstract

Scaling video diffusion transformers (DiTs) is limited by their quadratic 3D attention, even though most of the attention mass concentrates on a small subset of positions. We turn this observation into VSA, a trainable, hardware-efficient sparse attention that replaces full attention at \emph{both} training and inference.

Show full abstract

In VSA, a lightweight coarse stage pools tokens into tiles and identifies high-weight \emph{critical tokens}; a fine stage computes token-level attention only inside those tiles subjecting to block computing layout to ensure hard efficiency. This leads to a single differentiable kernel that trains end-to-end, requires no post-hoc profiling, and sustains 85\% of FlashAttention3 MFU. We perform a large sweep of ablation studies and scaling-law experiments by pretraining DiTs from 60M to 1.4B parameters. VSA reaches a Pareto point that cuts training FLOPS by 2.53$\times$ with no drop in diffusion loss. Retrofitting the open-source Wan-2.1 model speeds up attention time by 6$\times$ and lowers end-to-end generation time from 31s to 18s with comparable quality. These results establish trainable sparse attention as a practical alternative to full attention and a key enabler for further scaling of video diffusion models. Code will be available at https://github.com/hao-ai-lab/FastVideo.

View on arXivView PDF

Code Implementations(1)

Apache-2.0

A unified inference and post-training framework for accelerated video generation.

4,835533Python, SvelteOct 24, 20247 months agoApache-2.0
diffusersdiffusion-modelsdistillationinferencepost-training+1 more

Similar Papers

Cite this paper

@article{zhang2025vsa,
  title  = {VSA: Faster Video Diffusion with Trainable Sparse Attention},
  author = {Pei-Yuan Zhang and Yongqi Chen and Hao-Feng Huang and Will Lin and Zhengzhong Liu and Ion Stoica and E. Xing and Hao Zhang},
  year   = {2025},
  eprint = {2505.13389},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2505.13389},
  url    = {https://doi.org/10.48550/arXiv.2505.13389},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2505.13389.svg)](https://codeofpaper.com/paper/2505.13389)

Discussion