Adaptive Caching for Faster Video Generation with Diffusion Transformers

Kumara Kahatapitiya, Haozhe Liu, Sen He, Ding Liu, Menglin Jia, Chenyang Zhang, Michael S. Ryoo, Tian Xie · DOI

Introduction

Diffusion Transformers (DiTs) have established themselves as the state-of-the-art for high-fidelity video generation, powering models like Sora. However, their computational demands are significant. Generating high-resolution video requires substantial memory and long inference times due to complex attention mechanisms and the iterative nature of the denoising process.

A critical observation driving this research is that computational redundancy is not uniform across different video types; a static landscape requires far less update information per step than a dynamic action sequence. Existing acceleration methods often rely on fixed schedules, leading to inefficiencies where simple videos waste compute and complex videos suffer from artifacts.

The AdaCache Framework

To address these challenges, the authors propose AdaCache (Adaptive Caching), a training-free, plug-and-play method designed to accelerate DiT inference by dynamically managing computational resources based on content and motion.

1. Adaptive Caching Mechanism

Instead of recomputing every transformer block (Attention and MLP) at every denoising step, AdaCache stores "residuals"—the outputs added to the main feature stream. By employing a distance metric (such as L1 distance) to monitor changes in representations between steps, the system can decide to reuse cached residuals when changes fall below a specific threshold. This allows the model to bypass heavy computation while ensuring the latent representation continues to evolve smoothly.

2. Motion Regularization (MoReg)

To maintain quality in high-motion scenes, the framework includes a motion estimation component. By calculating motion scores and gradients directly from noisy latent features, the system can predict future motion intensity. When high motion is detected, the system automatically reduces caching to ensure sufficient "compute budget" is allocated to render the movement accurately.

Experimental Evaluation

The method was validated using several prominent open-source DiT backbones, including Open-Sora (v1.2), Open-Sora-Plan (v1.1), and Latte. Performance was measured using VBench for video quality, alongside standard metrics like PSNR, SSIM, and LPIPS across over 900 generated videos.

Comparison of Open-Sora baseline versus Open-Sora with AdaCache, demonstrating a 4.7x speedup with minimal quality loss across various scenes.

Key Results and Insights

AdaCache achieves significant performance gains across various models. On Open-Sora (720p), it reached a 4.7× speedup, while Open-Sora-Plan saw a 3.7× speedup. Crucially, VBench scores remained competitive with the baseline (e.g., 83.40 vs. 84.16), indicating that the adaptive nature of the caching successfully preserves visual and temporal fidelity.

Visual comparison of AdaCache performance across different base step configurations (100-step vs 30-step), showing consistent quality and reduced latency.

Key Findings:

  • Content-Aware Redundancy: Every video has a unique "fingerprint" of redundancy. Some sequences allow for aggressive caching much earlier than others, proving that caching must be adaptive to be truly efficient.
  • Residual Caching vs. Layer Skipping: Unlike methods that skip entire layers, caching residuals allows the latent representation to evolve smoothly, avoiding the instability often seen in layer-skipping approaches.
  • Human Preference: In a user study involving 1,800 responses, AdaCache-generated videos were preferred over previous state-of-the-art methods (like PAB) 70% of the time at comparable latencies.

Conclusion and Future Work

AdaCache represents a significant step toward efficient video generation without the need for retraining. While highly effective, extremely aggressive caching (aiming for >5× speedup) can still introduce artifacts like temporal flickering in complex scenes. Future research may focus on automating threshold selection through reinforcement learning and extending the framework to non-transformer architectures like pure U-Nets.

Summary updated

BibTeX
@misc{kahatapitiya2024adaptive,
  author = {Kumara Kahatapitiya and Haozhe Liu and Sen He and Ding Liu and Menglin Jia and Chenyang Zhang and Michael S. Ryoo and Tian Xie},
  title = {{Adaptive Caching for Faster Video Generation with Diffusion Transformers}},
  year = {2024},
  eprint = {2411.02397},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.02397},
}
Figure