Fast Autoregressive Video Generation with Diagonal Decoding

Yang Ye, Junliang Guo, Haoyu Wu, Tianyu He, Tim Pearce, Tabish Rashid, Katja Hofmann, Jiang Bian

Abstract

Autoregressive Transformer models have demonstrated impressive performance in video generation, but their sequential token-by-token decoding process poses a major bottleneck, particularly for long videos represented by tens of thousands of tokens. In this paper, we propose Diagonal Decoding (DiagD), a training-free inference acceleration algorithm for autoregressively pre-trained models that exploits spatial and temporal correlations in videos. Our method generates tokens along diagonal paths in the spatial-temporal token grid, enabling parallel decoding within each frame as well as partially overlapping across consecutive frames. The proposed algorithm is versatile and adaptive to various generative models and tasks, while providing flexible control over the trade-off between inference speed and visual quality. Furthermore, we propose a cost-effective finetuning strategy that aligns the attention patterns of the model with our decoding order, further mitigating the training-inference gap on small-scale models. Experiments on multiple autoregressive video generation models and datasets demonstrate that DiagD achieves up to $10\times$ speedup compared to naive sequential decoding, while maintaining comparable visual fidelity.

The Bottleneck of Sequential Decoding

Autoregressive (AR) Transformers are a cornerstone of modern video generation due to their scalability and ability to handle "streaming" generation of arbitrary lengths. However, they suffer from a significant inference bottleneck: sequential decoding. Standard AR models predict tokens one-by-one in a "raster-scan" order (left-to-right, top-to-bottom, frame-by-frame). For high-resolution video, this requires generating tens of thousands of tokens sequentially, leaving modern GPU hardware underutilized.

Moreover, the raster-scan order is somewhat arbitrary; a pixel is often more spatially related to the pixel directly above it than the one far to its left. Yet, the model is forced to wait for the entire previous row to finish before starting the next. This sequential dependency limits the throughput of even the most powerful generative models.

Methods: Exploiting Spatial-Temporal Redundancy

The core of our approach is Diagonal Decoding (DiagD), which shifts the generation order to exploit local correlations and enable massive parallelism:

  1. Spatial Parallelism: Instead of row-by-row, DiagD generates tokens along the diagonals of an image. Tokens on the same diagonal are generated simultaneously in a single forward pass, leveraging the fact that neighboring patches in a frame are highly correlated.
  2. Temporal Parallelism: DiagD stacks frames and begins generating the top-left tokens of the next frame before the current frame is even finished. This "partially overlapping" approach handles temporal redundancy by allowing the model to look ahead.
  3. Hyperparameter Control: Two parameters, $k$ (spatial neighbor availability) and $d$ (temporal delay), allow users to trade off between maximum speedup and visual fidelity.
  4. Lightweight Finetuning: For smaller models that might struggle with the change in decoding order, we introduce a cost-effective finetuning strategy (only ~1k steps) that aligns the model's attention mask with the diagonal decoding pattern.
The Diagonal Decoding process: tokens are generated in parallel along diagonal paths, allowing the next frame to begin before the previous one is fully completed.

Key Insights and Model Robustness

A significant finding of this work is that the "training-inference gap"—the performance drop when changing decoding order—scales inversely with model size. Larger models, such as the Cosmos 12B, are remarkably robust to DiagD. These models seem to naturally capture the spatial-temporal dependencies that DiagD exploits, even if they were originally trained with standard raster-scan masks.

Visualization of attention maps confirms this intuition: even standard AR models naturally assign high attention scores to tokens in diagonal and adjacent positions. DiagD simply aligns the execution order with these inherent model priorities, making it a largely "plug-and-play" solution for existing pre-trained AR video models.

Experimental Results

We evaluated DiagD across several diverse models, including Cosmos (a world foundation model), WHAM (action-conditioned generation), and MC-AR (Minecraft gameplay generation).

Performance comparison of DiagD vs. Naive Sequential Decoding (NTP). DiagD achieves up to 10.67x speedup on Cosmos 12B while maintaining or even slightly improving PSNR.
  • Speedup: DiagD achieves a 10.67× speedup on the Cosmos 12B model and a 7.95× speedup on the 4B version.
  • Visual Quality: On the Cosmos 12B model, DiagD (with $k=1$) actually achieved a slightly higher PSNR (15.71 vs 15.54) than standard sequential decoding, while maintaining nearly identical FVD (Fréchet Video Distance) scores.
  • Throughput: For the Cosmos 12B model, throughput jumped from 49 tokens/sec to 512 tokens/sec.
  • Human Evaluation: Side-by-side human tests indicated that DiagD-generated videos are comparable in visual quality and camera consistency to those generated by standard, slower methods.

Conclusion and Future Work

Diagonal Decoding offers a powerful, training-free path to accelerating autoregressive video generation. While smaller models (under 1B parameters) may require brief finetuning to maintain quality, large-scale models can adopt DiagD immediately to achieve order-of-magnitude speedups. Future work may involve training video models from scratch using diagonal attention masks to maximize efficiency gains and eliminate the training-inference gap entirely.

Summary updated

BibTeX
@inproceedings{ye2026fast,
  author = {Yang Ye and Junliang Guo and Haoyu Wu and Tianyu He and Tim Pearce and Tabish Rashid and Katja Hofmann and Jiang Bian},
  title = {{Fast Autoregressive Video Generation with Diagonal Decoding}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=Bbba3Pi4Xi},
}
Figure