Memory efficient caching speeds up diffusion model image generation
LiteCa: Memory-Efficient Feature Caching for Diffusion Acceleration
Computer Vision and Pattern RecognitionArtificial Intelligence
Summary
Generating images with diffusion models is powerful but slow because it needs a lot of memory to remember features during the process. The authors found that some parts of the model's parameters repeat in predictable ways and can be stored much more compactly. By storing these more efficiently and correcting errors during use, their method speeds up image generation while using less memory and even improves image quality. This makes it easier to run these models faster on limited memory.
What this means in practice
- •For machine learning engineers: Accelerate diffusion model-based image generation pipelines by reducing memory use and increasing inference speed without retraining.
- •For graphic software developers: Integrate faster and more memory-efficient diffusion-based image synthesis to enable smoother user experiences on graphics applications.$Commercial implications: Enables development of commercial image editing tools with quicker AI-based generation on consumer hardware.
Authors
Mian-Heng Shan, Cheng-De Fan, Cheng-Yu Yang, Cheng-Kuan Lin, Yu-Chee Tseng, Yu-Lun Liu
Abstract
Feature caching accelerates Diffusion Transformers (DiTs) by reusing intermediate features across timesteps. Recently, forecasting-based methods have shown that module features evolve predictably across timesteps, enabling temporal extrapolation for feature forecasting. However, storing module-level features and their historical states introduces substantial cache memory overhead. To solve this problem, we propose LiteCa, a training-free and plug-and-play memory-efficient feature caching framework. We observe that the Adaptive Layer Normalization (AdaLN) modulation parameters exhibit a low-rank structure, enabling LiteCa to build a more compact cache representation with an adjustable rank for different memory budgets. We further introduce Test-Time Correction to improve generation quality without changing the original forecasting method. Experiments on recent DiT models show that LiteCa reduces feature-cache memory by 90-99% compared with module-level caching, while improving both inference speed and generation quality and achieving state-of-the-art performance. Project page: https://samynhn.github.io/LiteCa/