Simple and Fast Distillation of Diffusion Models

Diffusion-based generative models have demonstrated their powerful performance across various tasks, but this comes at a cost of the slow sampling speed. To achieve both efficient and high-quality synthesis, various distillation-based accelerated sampling methods have been developed recently. However, they generally require time-consuming fine tuning with elaborate designs to achieve satisfactory performance in a specific number of function evaluation (NFE), making them difficult to employ in practice. To address this issue, we propose Simple and Fast Distillation (SFD) of diffusion models, which simplifies the paradigm used in existing methods and largely shortens their fine-tuning time up to 1000$\times$. We begin with a vanilla distillation-based sampling method and boost its performance to state of the art by identifying and addressing several small yet vital factors affecting the synthesis efficiency and quality. Our method can also achieve sampling with variable NFEs using a single distilled model. Extensive experiments demonstrate that SFD strikes a good balance between the sample quality and fine-tuning costs in few-step image generation task. For example, SFD achieves 4.53 FID (NFE=2) on CIFAR-10 with only 0.64 hours of fine-tuning on a single NVIDIA A100 GPU. Our code is available at https://github.com/zju-pi/diff-sampler.

Paper

References (63)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer 4y5W8/10 · confidence 4/52024-06-12

Summary

This paper presents a fast-training accelerate sampling algorithm that is based on the distillation paradigm. This algorithm performs trajectory matching under all time points from 1 to 0 (t=80-0.006). The approach avoids the huge overhead of bi-level optimization through the ``detach()'' operation in pytorch, and further improves the performance of the algorithm by correcting the settings of a series of hyperparameters: loss function ($L_1$), step-condition, analytical first step.

Strengths

1. The results of the algorithm presented in this paper are extremely impressive, surpassing all known distillation-based accelerated sampling algorithms. 2. The experiments conducted in this paper are thorough and well-analyzed. Particularly enlightening is the analysis of the guidance scale on Stable Diffusion. 3. The paper is exceptionally well-written, offering clarity and ease of understanding, and it is inspiring in various ways. Notable examples include the introduction of the SFD algorithm and the innovative use of CFG=1 for training, as well as the adaptation of any CFG for inference on SD-v1.5.

Weaknesses

The paper has no significant shortcomings; however, it is worth noting that while the algorithm substantially reduces training costs, it also inevitably lowers the maximum performance threshold. An open question remains: if we extend the training duration, can we achieve results comparable to those of the CTM? It appears that not all time steps contribute equally to model performance. Additionally, introducing randomness through local trajectory matching could potentially enhance generalization.

Questions

1. Can SFD accelerate DiT? It would be beneficial to include some preliminary experiments to explore this possibility. 2. Many accelerated sampling algorithms for diffusion models employ discriminators for trajectory matching, with LCM being a prominent example. Could this discriminator-based approach outperform $L_1$ loss in the context of SFD? 3. Is there a bound for SFD's performance as training time is extended? Given that matching in the form of global inherently involves compression by discarding randomness.

Rating

8

Confidence

4

Soundness

4

Presentation

4

Contribution

4

Limitations

Yes

Authorsrebuttal2024-08-08

We appreciate the reviewer's fast responce and we actually share the same viewpoints with you. We fully agree that LCM can benefit from the discriminator, as LCM is categorized as a *consistency distillation* method (mentioned in Appendix A), instead of *trajectory distillation*. The goal of trajectory distillation methods is to faithfully match the whole trajectory (i.e., build shortcuts from $x_t$ to $x_s$ for sampled $t$ and $s$). For consistency distillation method like LCM, the actual effect is to build shortcuts from $x_t$ to $x_0$ for every sampled $t$, which is the same as that of the GAN loss. Therefore, LCM can indeed benefit from discriminator.

Reviewer 4y5W2024-08-13

Based on my thorough consideration, I think this paper is so valuable, and I finally decided to upgrade the ratings from Accept to Strong Accept. Good luck!

Reviewer RDCV6/10 · confidence 3/52024-07-07

Summary

This paper proposes a fast distillation method for diffusion models. This method simplifies the existing knowledge distillation framework and proposes Simple and Fast Distillation from a global perspective to reduce redundant time steps in training. The SFD framework can achieve good experimental results in a very short time compared to existing methods.

Strengths

1. The method proposed in the paper is not complicated and explores many available improvement ideas, achieving good results. 2. Compared with existing methods, the method proposed in this paper can achieve good results in an extremely short time, with significant improvements in time efficiency.

Weaknesses

1. Many of the techniques in the paper lack innovation and are more like technical explorations. 2. Some of the figures in the paper are difficult to understand, and figures like fig.6 should be explained more. 3. The selection of some hyperparameters in the paper, such as t_min, appears too random. 4. If the performance of other training methods such as CTM under the same training time as SFD were reported, it will further demonstrate the superiority of the proposed method.

Questions

1. Add more explanations to some meaningful figs in the paper. 2. Conduct more ablation experiments or explain the criteria for selecting some hyperparameters in the method. 3. Adding more experiment as I mentioned in weakness 4.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes, the authors adequately addressed the limitations.

Authorsrebuttal2024-08-12

Thank you for your response!

Dear reviewer RDCV, We appreciate your feedback and your note for the concurrent work! We will discuss it in the next version of this paper. If we have addressed your concerns, please consider update the score in the reviewer's console. Best regards, Authors

Reviewer bYyR6/10 · confidence 4/52024-07-25

Summary

In this work authors propose a novel diffusion distillation method by unrolling the student model to match unrolled/generated pre-trained diffusion (teacher) model's trajectory. Authors demonstrate effectiveness and compute efficiency of approach on stable diffusion.

Strengths

Paper is easy to read and follow. Show effectiveness on stable diffusion and much faster to train for large scale stable Diffusion too. It is interesting to see fixing model at some part improves model over all other parts.

Weaknesses

What is effect of SFD on diversity w.r.t distilled model? It might be easy to have high quality but much lower diversity. Proposed unrolling of student model ( global trajectory optimization) is effectively multi-step training like in structured prediction and imitation learning which has shown to be prone to mode-collapse. Justification of method is still unclear and also not sure on how sensitive is SFD to training time noise schedule/time step weighting i.e., forward diffusion process and its impact on induced trajectory. E.g. if we assume flow matching style linear trajectories, they could be more easier to distill within proposed framework. Unrolling trajectories for distillation is also considered in previous works to account for accumulation of error like BOOT, ImagineFlash, etc. So that in isolation can't be considered as major contribution. Also proposed method though is more effective for Stable Diffusion, there is siginificant performance drop on LSUN, ImageNet etc w.r.t progressive distillation or consistency distillation? This also further raises questions and need for additional experiments to understand under what settings this method is effective.

Questions

Though 'N-model' to finetune has been used, it is interesting to see fixing model at some part improves model over all other parts. This could indicate lower curvature part of trajectory and its more a directional feedback which SFD might be exploiting? Can authors further comment on this? W.r.t trajectory distillation techniques, Consistency Distillation can take potentially shortcuts. But PG retains gradient field. So not sure if such characterization is correct.

Rating

6

Confidence

4

Soundness

2

Presentation

3

Contribution

2

Limitations

As discussed in weakness and questions generalization to other models is unclear, effect of forward process on SFD? And currently this work also lacks conclusive reasoning under what settings its useful also do not demonstrate impact on diversity, etc.

Authorsrebuttal2024-08-07

Reference for the rebuttal

[1] Naeem M F, Oh S J, Uh Y, et al. Reliable fidelity and diversity metrics for generative models[C]//International Conference on Machine Learning. PMLR, 2020: 7176-7185. [2] Karras T, Aittala M, Aila T, et al. Elucidating the design space of diffusion-based generative models[J]. Advances in neural information processing systems, 2022, 35: 26565-26577. [3] Rombach R, Blattmann A, Lorenz D, et al. High-resolution image synthesis with latent diffusion models[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2022: 10684-10695. [4] Lipman Y, Chen R T Q, Ben-Hamu H, et al. Flow matching for generative modeling[J]. arXiv preprint arXiv:2210.02747, 2022. [5] Liu X, Gong C, Liu Q. Flow straight and fast: Learning to generate and transfer data with rectified flow[J]. arXiv preprint arXiv:2209.03003, 2022. [6] Gu J, Zhai S, Zhang Y, et al. BOOT: Data-free Distillation of Denoising Diffusion Models with Bootstrapping[J]. arXiv preprint arXiv:2306.05544, 2023. [7] Kohler J, Pumarola A, Schönfeld E, et al. Imagine flash: Accelerating emu diffusion models with backward distillation[J]. arXiv preprint arXiv:2405.05224, 2024. [8] Chen D, Zhou Z, Wang C, et al. On the Trajectory Regularity of ODE-based Diffusion Sampling[J]. arXiv preprint arXiv:2405.11326, 2024.

Authorsrebuttal2024-08-09

Thank you for your valuable suggestions!

Thank you for your suggestions and increasing your rating to weak accept! We appreciate the reviewer's valuable suggestions, and further clarify several points below. 1. Our method is also good at diversity preserving on SDv1.5. We evaluate the diversity of SFD-v measured by recall and coverage, using 5,000 generated images with random prompts and the MS-COCO 2017 validation set. |Solver|Steps|FID|Recall|Coverage| |-|-|-|-|-| |SFD-v|4|24.2|0.44|0.36| |SFD-v|5|23.5|0.44|0.37| |DPM-Solver++(3M)|8|25.1|0.42|0.39| |DPM-Solver++(3M)|10|24.6|0.43|0.39| 2. For the details of forward diffusion, the used LSUN-Bedroom model adopts a Variance-preserving (VP) SDE framework in the latent space [3], while the ImageNet model adopts the EDM framework [2] which resembles a Variance-exploding (VE) SDE framework. Trajectories generated under these two frameworks can be transformed into each other through a simple coefficient. Trajectories generated by the ImageNet model resembles that of the CIFAR-10 model [8], while the LSUN-Bedroom model generates trajectories resemble Figure 9a in the main text. 3. We will provide more detailed experimental results to analyze the robustness of our method w.r.t noise schedules (including Flow Matching Schedule) in the later revision of this paper. 4. We will keep improving the effectiveness of this method, and we hope it will benefit the broader community in the future.

Authorsrebuttal2024-08-12

Gentle reminder for updating the score

Dear reviewer bYyR, We appreciate the time and effort you put in reviewing this paper as well as increasing your rating to weak accept! The discussion period will end in two days. This is a kind reminder for considering updating the score in the reviewer's console. Best regards, Authors

Reviewer 4y5W2024-08-08

Most Concerns addressed

I thank the authors for their response. I think most of my proposed concerns are addressed. However, I don't agree with the idea that LCM can't benefit from discriminator. Although the original LCM paper did not leverage GAN Loss, many papers have demonstrated that this form is effective, for example: [1] Kong F, Duan J, Sun L, et al. ACT-Diffusion: Efficient Adversarial Consistency Training for One-step Diffusion Models[C]//Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2024: 8890-8899. [2] Liu H, Xie Q, Deng Z, et al. SCott: Accelerating Diffusion Models with Stochastic Consistency Distillation[J]. arXiv preprint arXiv:2403.01505, 2024. [3] Zhai Y, Lin K, Yang Z, et al. Motion Consistency Model: Accelerating Video Diffusion with Disentangled Motion-Appearance Distillation[J]. arXiv preprint arXiv:2406.06890, 2024. Especially the last one, I've recently explored the effects of the combination of discriminator and LCM, and this pipeline has demonstrated to be very effective. I have scanned the comments of the other reviewers and the authors' responses, and I continue to keep my point that this work is excellent and informative, and I believe that this approach could even be beneficial for dataset distillation on diffusion models. Therefore, I maintain my original score.

Reviewer bYyR2024-08-08

Thank you for clarification

I appreciate authors clarifications, would raise my rating to weak accept. It is encouraging to see diversity preserving on CIFAR10, but would be useful to report it on SDv1.5 variants of checkpoints. If precision-recall is expensive to compute/setup, something like LPIPS diversity with say ~30 prompts with 20-30 seeds would be informative for community to understand how this method performs at scale. Agreed on importance of unrolling w.r.t distillation and like the smoothing interpretation of this work. W.r.t Performance drop on LSUN/ImageNet, Question was not why is not SOTA but more about what details w.r.t forward diffusion, weighting etc and its implications on resultant trajectories effect the proposed method. Proposed method robustness w.r.t polynomial coefficients is encouraging, though looking at different class of schedules and resultant trajectories would be interesting, e.g. Flow Matching Schedule vs scaled linear [1]. would encourage authors to consider that for later revision of the paper. Given method has comparable performance SDv1.5 for 4-steps but significant gap to 2-steps compared to progressive distillation albeit at much lesser training. Given method's potential to be more effective if resultant trajectories have less curvature, would consider this work useful and potentially effective for more recent Flow Matching style large models. Would give it weak accept currently, as reasons of when it is effective is a bit unclear to adopt it across settings for broader community. [1] Kingma et al. Understanding Diffusion Objectives as the ELBO with Simple Data Augmentation

Reviewer RDCV2024-08-12

Concerns addressed

Thanks for your response. After reading the authors' rebuttal and other reviewers comments, the concerns are addressed, I raise my score to weak accept. In the next version, I hope this paper could conduct discussion with the concurrent work Relational Diffusion Distillation (RDD). Reference: Feng W, Yang C, An Z, et al. Relational Diffusion Distillation For Efficient Image Generation[C]//ACM Multimedia 2024.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC