- This is an official implementation of the Refined Exponential Solver (RES) sampling algorithm for diffusion models.
- It also includes a general framework for implementing various sampling algorithms based on solving diffusion ODE/SDE.
- Aug 24, 2025. RES is quite popular in the open source community; see r/StableDiffusion. There are several good sampler/scheduler implementations based on RES. You may find the following repos helpful: RES4LYF ComfyUI, ComfyUI-Extra-Samplers, and webUI_ExtraSchedulers, which offer more engineering robustness and have been well tested.
This work was done during the summer of 2023 and got rejected by NeurIPS. I was sad and disappointed, so I didn't bother promoting or advertising the work and got busy with other stuff. I figured it was just another paper that few people would read due to all the verbose math.
Fast forward to August 2025, when a friend asked me what is RES_2s. That's when I realized, damn, this might actually be the work with the most users! Of course, the number of users far exceeds the citation count for the paper. 📈
If you use this codebase, or otherwise found our work valuable, please cite:
@article{zhang2023improved,
title={Improved order analysis and design of exponential integrator for diffusion models sampling},
author={Zhang, Qinsheng and Song, Jiaming and Chen, Yongxin},
journal={arXiv preprint arXiv:2308.02157},
year={2023}
}
@article{zhang2022fast,
title={Fast Sampling of Diffusion Models with Exponential Integrator},
author={Zhang, Qinsheng and Chen, Yongxin},
journal={arXiv preprint arXiv:2204.13902},
year={2022}
}
@misc{zhang2022gddim,
title={gDDIM: Generalized denoising diffusion implicit models},
author={Qinsheng Zhang and Molei Tao and Yongxin Chen},
year={2022},
eprint={2206.05564},
archivePrefix={arXiv},
primaryClass={cs.LG}
}