News Infrastructure

Google speeds up video diffusion on TPUs with sparse attention

Google Developers describes how Sparse VideoGen skips low-value attention work, so video diffusion models spend less time on each denoising step on TPUs.

Google is speeding up high-resolution video generation on its TPU chips by skipping attention work that adds little to the result. Google Developers describes the effort as a case study in turning theoretical sparsity into a real end-to-end speedup.

Video diffusion models create a clip through many denoising steps, and each step is costly. Google says self-attention, the part that compares every piece of the video with every other piece, becomes a dominant source of delay at long sequence lengths. An 81-frame 720p video produces sequences of 50K to 400K tokens in popular open source models.

Moving from 720p to 1440p can quadruple that length. Because full attention cost grows quadratically, its share of per-layer latency can rise from 55.5% to 88.2% on eight TPU v6e chips, according to Google.

The approach builds on Sparse VideoGen, which sorts attention heads into spatial heads and temporal heads. A spatial head focuses on patches in the same or nearby frames. A temporal head follows a small image region across many frames. At inference time, the method samples a few queries and picks the mask whose output stays closest to full attention.

Source: Accelerating Spatio-Temporal Attention for Video Diffusion on TPUs – Google Developers Blog.