One-step Diffusion with Distribution Matching Distillation

Tianwei Yin, Michaël Gharbi, Richard Zhang, Eli Shechtman, Frédo Durand, William T. Freeman, Taesung Park · DOI

Abstract

Distribution Matching Distillation (DMD) addresses the high computational cost of diffusion models by distilling them into efficient one-step generators. By minimizing the KL divergence between the student and teacher distributions using a novel "real vs. fake" score gradient, DMD achieves image quality comparable to Stable Diffusion while operating at 20 FPS. This approach effectively eliminates the "speed tax" of iterative denoising without sacrificing visual fidelity or text alignment.

Introduction

Diffusion models, such as Stable Diffusion and DALL-E, have established the state-of-the-art in high-quality image synthesis. However, their iterative denoising process—requiring dozens or hundreds of forward passes—imposes a significant "speed tax," making them unsuitable for real-time applications or interactive creative tools. Previous distillation attempts often resulted in reduced image quality or required complex, multi-stage training. Distribution Matching Distillation (DMD) overcomes these hurdles by transforming slow, multi-step models into lightning-fast, one-step generators.

Methodology

The core of DMD is a procedure that forces the student network's entire output distribution to match that of the teacher model, rather than performing simple pixel-wise regression.

Distribution Matching Loss

The authors minimize an approximate KL divergence between the generator's output and the target distribution. The gradient for this loss is derived from the difference between two score functions:

  • "Real" Score: A fixed pretrained base diffusion model provides signals on how to make images appear more realistic.
  • "Fake" Score: A second diffusion model, trained concurrently on the generator's outputs, identifies artifacts that make the current images appear "fake."

Regression and Architecture

To ensure training stability and prevent mode collapse, a regression loss using the LPIPS metric is incorporated. This anchors the one-step generator to the global layout and structure of the original teacher model. The generator itself utilizes the same architecture as the base diffusion model but is optimized to produce a final image from random noise in a single pass.

Key Insights

  • The "Real vs. Fake" Gradient: By subtracting the "fake" score from the "real" score, the system creates a directional gradient that nudges synthetic images toward realism while actively suppressing current generator artifacts.
  • Distribution-Centric Optimization: Unlike methods that attempt to follow the exact mathematical ODE path of the diffusion process, DMD focuses directly on matching the start and end distributions, allowing for more efficient one-step convergence.
  • Regression as an Anchor: While the distribution loss handles high-frequency details, the regression loss ensures the model retains the diverse modes present in the teacher model.

Experimental Results

DMD was evaluated on benchmarks including ImageNet 64×64, CIFAR-10, MS-COCO, and LAION-Aesthetic.

Qualitative comparison between the multi-step teacher model (top) and the one-step DMD student (bottom) across various prompts.

Performance and Quality

  • Speed: DMD generates 512×512 images at 20 FPS on modern hardware (using FP16 inference), a 100x speedup over standard diffusion.
  • Fidelity: On ImageNet 64×64, DMD achieved an FID of 2.62, significantly outperforming other few-step methods like Consistency Models (FID 6.20).
  • Text-to-Image Alignment: On zero-shot COCO, DMD reached an FID of 11.49, closely approaching the teacher Stable Diffusion model's score of 8.78 while using 100x fewer evaluations. Qualitative results demonstrate that DMD preserves intricate details and text-alignment that previous one-step methods often lost.

Conclusion and Future Work

DMD represents a major step toward real-time, high-quality generative AI. While training remains computationally intensive due to the requirement of multiple score-function models, the resulting inference speed is transformative. Future work may explore memory-efficient training techniques like LoRA or extend the distribution matching framework to video and audio synthesis.

Summary updated

BibTeX
@inproceedings{yin2023one,
  author = {Tianwei Yin and Michaël Gharbi and Richard Zhang and Eli Shechtman and Frédo Durand and William T. Freeman and Taesung Park},
  title = {{One-step Diffusion with Distribution Matching Distillation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2023},
  doi = {10.1109/cvpr52733.2024.00632},
}
Figure