Playing with Transformer at 30+ FPS via Next-Frame Diffusion

Xinle Cheng, Tianyu He, Jiayi Xu, Junliang Guo, Di He, Jiang Bian

TL;DR

Next-Frame Diffusion (NFD) is a novel autoregressive diffusion transformer that breaks the real-time barrier for interactive video generation, achieving over 30 FPS on a single A100 GPU. By combining block-wise causal attention, video consistency distillation, and action-based speculative sampling, NFD delivers high-fidelity, action-conditioned video generation without the typical latency bottlenecks of diffusion models.

What Problem Does This Paper Address?

Interactive applications like video games or robotics simulators require causal video generation—producing frames sequentially based on real-time user actions. Existing full-sequence diffusion models (like Sora) generate all frames at once, making them unusable for streaming or interactive scenarios.

Conversely, traditional autoregressive models generate video token-by-token or frame-by-frame using discrete latent spaces (like VQ-VAEs). This approach suffers from two major flaws: quantization artifacts that degrade visual quality, and high sequential latency that prevents real-time performance. The authors tackle this dilemma, aiming to achieve the high visual quality of continuous-space diffusion models while matching or exceeding the real-time speed requirements (>30 FPS) of interactive world models.

Methods

The authors introduce Next-Frame Diffusion (NFD), which incorporates several key architectural and sampling innovations:

  • Block-wise Causal Attention: Instead of computationally intensive 3D full attention across all frames, NFD uses a block-wise causal mask. This allows bidirectional self-attention within the tokens of a single frame (enabling parallel generation of the entire frame) while enforcing strict causal attention on past frames. This design reduces overall attention overhead by 50%.
Figure 1: We present Next-Frame Diffusion (NFD), an autoregressive diffusion transformer that employs block-wise causal attention. This design enables parallel generation of multiple tokens for an entire frame, thereby enhancing sampling efficiency and better aligning with hardware constraints.
  • Video Consistency Distillation: To bypass the dozens of sampling steps usually required by diffusion models, the authors extend consistency distillation (specifically the sCM framework) to the video domain. They introduce independent frame timesteps, 3D tangent normalization to reduce gradient variance, and adversarial supervision, allowing high-quality sampling in just 4 steps (NFD+).
  • Speculative Sampling: In interactive environments, action sequences often exhibit short-term consistency (e.g., a player holding down the "sprint" key across multiple frames). NFD+ exploits this by replicating the current action input $N$ times to speculatively generate $N$ future frames in parallel. If a change in user action is detected later, the incorrect speculative frames are discarded, ensuring responsiveness without sacrificing parallel throughput.
  • Noise Injection & KV Caching: To mitigate the error accumulation inherent to autoregressive rollouts, the authors inject a small amount of Gaussian noise into context frames during sampling. They also implement a specialized Key-Value (KV) caching strategy that reuses KVs computed during the first denoising step across subsequent steps.

Datasets

  • VPT (Video Pretraining) Dataset: A large-scale dataset consisting of paired Minecraft gameplay videos and action sequences. The authors filtered the data to exclude frames where the GUI was open or actions were missing, resulting in approximately 10M clips for training, 0.5K for validation, and 1K for testing. Frames were processed at a resolution of 384 × 224.
  • VBench: A comprehensive evaluation benchmark used to assess advanced video generation capabilities, specifically focusing on subject consistency, image quality, and dynamic degree.

Key Insights and Ideas

  • Exploiting Action Redundancy: The introduction of speculative sampling based on action continuity is a clever bridge between user behavior and hardware parallelism. It allows the model to leverage GPU parallel computation by "gambling" on the future with very low overhead.
  • Continuous Space Beats Discrete Tokens: Operating in a continuous latent space avoids the blocky, artificial look of discrete VQ-based autoregressive models, proving that diffusion can be both high-quality and fast enough for real-time applications if distilled properly.
  • Frame-Parallel, Time-Causal: Generating an entire frame's tokens simultaneously via block-wise attention strikes a highly effective balance between hardware efficiency (fully utilizing GPU tensor cores) and temporal causality.

Key Results

  • Real-Time Throughput: The accelerated model variant, NFD+, achieves 31.14 FPS with a 310M parameter model and 42.46 FPS with a 130M model on a single NVIDIA A100 GPU, marking a first for autoregressive video diffusion.
  • State-of-the-Art Quality: As shown in the quantitative evaluation, the base NFD (310M) achieves a Fréchet Video Distance (FVD) of 212, outperforming the much larger MineWorld baseline (1.2B parameters, FVD of 227) while running more than 2× faster even before distillation.
Table 1: Quantitative comparison with the baselines on both sampling efficiency and visual quality. NFD denotes the model trained using a Flow Matching objective and sampled with DPM-Solver++ using 18 sampling steps, while NFD+ indicates the accelerated variant of the model, incorporating consistency distillation and speculative sampling, and employing only 4 sampling steps. All FPS are evaluated on a NVIDIA A100 GPU with batch size of 1.
  • Qualitative Fidelity: NFD+ demonstrates superior temporal consistency and visual memory. It accurately preserves fine-grained physical properties (such as door geometry during opening sequences) and successfully reconstructs previously seen objects without the distortions common in discrete autoregressive models.
Figure 2: Qualitative results of the generated videos. Each row depicts a sequence of frames generated in response to a specific action command, such as sprint, attack, jump, and camera shift.

Limitations and Future Work

  • Short Context Window: The current implementation is constrained by a limited temporal context window (32 frames during training), which restricts its ability to model long-range dependencies or support long-term planning.
  • Domain Specificity: NFD was trained and evaluated exclusively on Minecraft gameplay data. Its generalization to other complex domains, such as autonomous driving or real-world robotics, remains unverified without substantial retraining.
  • Fixed Resolution: The model operates at a fixed resolution of 384 × 224 to balance quality and computational cost. The authors note that future work will focus on scaling NFD to larger models and higher resolutions, as well as exploring advanced acceleration techniques like post-training quantization.

Summary updated

BibTeX
@misc{cheng2025playing,
  author = {Xinle Cheng and Tianyu He and Jiayi Xu and Junliang Guo and Di He and Jiang Bian},
  title = {{Playing with Transformer at 30+ FPS via Next-Frame Diffusion}},
  year = {2025},
  eprint = {2506.01380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.01380},
}
Figure