Linear Combination of Saved Checkpoints Makes Consistency and Diffusion Models Better
Enshu Liu, Junyi Zhu, Zinan Lin, Xuefei Ning, Shuaiqi Wang, Matthew B. Blaschko, Sergey Yekhanin, Shengen Yan, Guohao Dai, Huazhong Yang, Yu Wang
TL;DR
This work tackles the underutilization of intermediate model checkpoints in diffusion and consistency models by introducing Linear Combination of Saved Checkpoints (LCSC), a gradient-free method that searches for optimal linear coefficients to merge saved weights along training. The authors provide theoretical analysis showing EMA is suboptimal for merging coefficients and demonstrate empirically that carefully merged checkpoints can reach high-quality basins inaccessible to standard SGD optimization, enabling substantial training-time savings and improved final generation quality. Across diffusion and consistency modeling, including LoRA-augmented and text-to-image scenarios, LCSC yields major speedups (up to ~23× in CM training and reduced NFE in DM) and enhances both pre-trained and converged models. The results underscore LCSC's practicality, generalizability across metrics and data, and potential for broader application beyond the studied diffusion tasks.
Abstract
Diffusion Models (DM) and Consistency Models (CM) are two types of popular generative models with good generation quality on various tasks. When training DM and CM, intermediate weight checkpoints are not fully utilized and only the last converged checkpoint is used. In this work, we find that high-quality model weights often lie in a basin which cannot be reached by SGD but can be obtained by proper checkpoint averaging. Based on these observations, we propose LCSC, a simple but effective and efficient method to enhance the performance of DM and CM, by combining checkpoints along the training trajectory with coefficients deduced from evolutionary search. We demonstrate the value of LCSC through two use cases: $\textbf{(a) Reducing training cost.}$ With LCSC, we only need to train DM/CM with fewer number of iterations and/or lower batch sizes to obtain comparable sample quality with the fully trained model. For example, LCSC achieves considerable training speedups for CM (23$\times$ on CIFAR-10 and 15$\times$ on ImageNet-64). $\textbf{(b) Enhancing pre-trained models.}$ Assuming full training is already done, LCSC can further improve the generation quality or speed of the final converged models. For example, LCSC achieves better performance using 1 number of function evaluation (NFE) than the base model with 2 NFE on consistency distillation, and decreases the NFE of DM from 15 to 9 while maintaining the generation quality on CIFAR-10. Our code is available at https://github.com/imagination-research/LCSC.
