Abstract
DeepCache is a novel, training-free paradigm designed to accelerate diffusion models by exploiting "temporal redundancy"—the observation that high-level features in the model change very slowly across denoising steps. By caching these features and updating only the computationally cheaper low-level details, DeepCache achieves up to a 7x speedup in models like Stable Diffusion and LDM with minimal impact on image quality.
Introduction
Diffusion models have revolutionized image synthesis but remain computationally expensive due to the sequential nature of the denoising process and the massive size of the underlying U-Net architectures. While "fast samplers" (like DDIM) reduce the number of steps, the cost of each individual step remains high. DeepCache addresses this by optimizing the model architecture during inference without requiring any retraining or distillation.
Methodology: Exploiting Temporal Redundancy
The core insight of DeepCache is that adjacent steps in the denoising process are highly similar. Specifically, "high-level" features (global structure and concepts) evolve much more slowly than "low-level" features (fine textures and noise).
DeepCache leverages the standard U-Net architecture to implement a caching strategy:
- Full Inference Step: The model performs a full pass and caches the high-level features produced by the deep up-sampling blocks.
- Partial Inference Steps: For the next $N-1$ steps, the model skips the expensive deep layers, executing only the shallow down-sampling blocks and retrieving cached features to complete the computation.
- Non-uniform Strategy: The authors introduced a strategy that performs full updates more frequently when the image is changing rapidly and less frequently when it is stable.
Key Results and Visual Quality
DeepCache was evaluated across standard benchmarks including CIFAR-10, LSUN, ImageNet, and MS-COCO. For Stable Diffusion v1.5, it achieved a 2.3x speedup with a negligible decline in CLIP Score. On ImageNet, LDM-4-G achieved a 4.1x speedup with nearly identical image quality.
In peak configurations, the method demonstrated up to a 7.0x speedup while maintaining recognizable and high-quality outputs. Because it is purely an inference-time logic change, it is fully compatible with existing pre-trained models and fast samplers.
Discussion and Limitations
DeepCache is a rare "free lunch" in deep learning, offering significant efficiency gains without retraining. However, its performance is tied to the U-Net's skip-connection structure and may require adaptation for newer transformer-based backbones. Additionally, the speedup is capped by the cost of the "shallow" layers, and excessively large caching intervals can lead to visual artifacts.
Conclusion
By identifying and exploiting temporal redundancy, DeepCache provides a simple, effective way to make the most popular generative models significantly faster, increasing throughput on consumer-grade hardware without sacrificing the creative potential of diffusion models.
Summary updated