Skip to main content
QUICK REVIEW

[Paper Review] On Distillation of Guided Diffusion Models

Chenlin Meng, Rombach, Robin|arXiv (Cornell University)|Oct 6, 2022
Advanced Neuroimaging Techniques and ApplicationsMedicine8 citations
TL;DR

This paper proposes a two-stage distillation framework to accelerate classifier-free guided diffusion models, enabling high-fidelity image generation in as few as 1–4 denoising steps. By first distilling the combined output of conditional and unconditional teacher models into a single student model, and then progressively distilling it to fewer steps, the method achieves up to 256× faster sampling than standard diffusion models while maintaining competitive FID and IS scores on ImageNet and LAION benchmarks.

ABSTRACT

Classifier-free guided diffusion models have recently been shown to be highly effective at high-resolution image generation, and they have been widely used in large-scale diffusion frameworks including DALLE-2, Stable Diffusion and Imagen. However, a downside of classifier-free guided diffusion models is that they are computationally expensive at inference time since they require evaluating two diffusion models, a class-conditional model and an unconditional model, tens to hundreds of times. To deal with this limitation, we propose an approach to distilling classifier-free guided diffusion models into models that are fast to sample from: Given a pre-trained classifier-free guided model, we first learn a single model to match the output of the combined conditional and unconditional models, and then we progressively distill that model to a diffusion model that requires much fewer sampling steps. For standard diffusion models trained on the pixel-space, our approach is able to generate images visually comparable to that of the original model using as few as 4 sampling steps on ImageNet 64x64 and CIFAR-10, achieving FID/IS scores comparable to that of the original model while being up to 256 times faster to sample from. For diffusion models trained on the latent-space (e.g., Stable Diffusion), our approach is able to generate high-fidelity images using as few as 1 to 4 denoising steps, accelerating inference by at least 10-fold compared to existing methods on ImageNet 256x256 and LAION datasets. We further demonstrate the effectiveness of our approach on text-guided image editing and inpainting, where our distilled model is able to generate high-quality results using as few as 2-4 denoising steps.

Motivation & Objective

  • To address the high computational cost of classifier-free guided diffusion models, which require tens to hundreds of inference-time evaluations of two separate models.
  • To develop a distillation method that enables fast sampling from distilled models without sacrificing image quality or guidance flexibility.
  • To extend distillation techniques to both pixel-space and latent-space diffusion models, including state-of-the-art models like Stable Diffusion.
  • To enable efficient text-to-image generation, image editing, and inpainting with minimal sampling steps.

Proposed method

  • Introduce a single student model that learns to match the combined output of the teacher’s conditional and unconditional diffusion models.
  • Use a two-stage distillation process: first train a student to mimic the teacher’s output, then progressively distill it into a model requiring fewer sampling steps.
  • Leverage existing deterministic and propose a stochastic sampling process for inference using the distilled model.
  • Apply the distillation framework to both pixel-space models (e.g., on CIFAR-10 and ImageNet 64×64) and latent-space models (e.g., Stable Diffusion on ImageNet 256×256 and LAION 512×512).
  • Train the distilled model to support a range of guidance weights, enabling trade-offs between sample diversity and quality.
  • Use a weighted MSE objective during distillation to align the student model’s predictions with the teacher’s output across different guidance strengths.

Experimental results

Research questions

  • RQ1Can distillation be effectively applied to classifier-free guided diffusion models, which require inference from two models?
  • RQ2Can a single distilled model achieve high-quality image generation with as few as 1–4 denoising steps while preserving guidance flexibility?
  • RQ3Does the proposed two-stage distillation approach maintain or improve FID and IS scores compared to the original model?
  • RQ4Can the distilled model generalize across diverse diffusion model architectures, including both pixel-space and latent-space variants?
  • RQ5Can the method be successfully applied to downstream tasks like text-to-image generation, image editing, and inpainting with minimal sampling steps?

Key findings

  • The distilled model achieves FID scores comparable to the teacher model on ImageNet 64×64 and CIFAR-10 using only 4 sampling steps, with inference speedups of up to 256×.
  • On latent-space models like Stable Diffusion, the method reduces sampling steps to 1–4, achieving at least 10× faster inference than existing methods on ImageNet 256×256 and LAION 512×512.
  • The distilled model maintains high visual quality across diverse guidance weights (w = 0 to w = 4), enabling effective trade-offs between diversity and fidelity.
  • For text-guided image editing and inpainting, the method generates high-quality results using only 2–4 denoising steps, demonstrating strong performance in editing tasks.
  • The stochastic sampling process further improves sample quality over deterministic sampling, especially at low step counts.
  • The method is the first to demonstrate effective distillation for both pixel-space and latent-space classifier-free guided diffusion models, with consistent performance gains across benchmarks.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.