CVDec 15, 2023

Faster Diffusion: Rethinking the Role of the Encoder for Diffusion Model Inference

arXiv:2312.09608v236 citationsh-index: 23NIPS
Originality Incremental advance
AI Analysis

This addresses the inference speed bottleneck for users of diffusion models, offering a practical acceleration method without distillation, though it is incremental as it builds on existing encoder-decoder architectures.

The paper tackles the slow inference time of diffusion models for image generation by proposing to omit encoder computations at adjacent time-steps and reuse features, accelerating sampling by 41% for Stable Diffusion, 24% for DeepFloyd-IF, and 34% for DiT models while maintaining quality.

One of the main drawback of diffusion models is the slow inference time for image generation. Among the most successful approaches to addressing this problem are distillation methods. However, these methods require considerable computational resources. In this paper, we take another approach to diffusion model acceleration. We conduct a comprehensive study of the UNet encoder and empirically analyze the encoder features. This provides insights regarding their changes during the inference process. In particular, we find that encoder features change minimally, whereas the decoder features exhibit substantial variations across different time-steps. This insight motivates us to omit encoder computation at certain adjacent time-steps and reuse encoder features of previous time-steps as input to the decoder in multiple time-steps. Importantly, this allows us to perform decoder computation in parallel, further accelerating the denoising process. Additionally, we introduce a prior noise injection method to improve the texture details in the generated image. Besides the standard text-to-image task, we also validate our approach on other tasks: text-to-video, personalized generation and reference-guided generation. Without utilizing any knowledge distillation technique, our approach accelerates both the Stable Diffusion (SD) and DeepFloyd-IF model sampling by 41$\%$ and 24$\%$ respectively, and DiT model sampling by 34$\%$, while maintaining high-quality generation performance.

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes