Implementation of (variants of) the randomized midpoint method for diffusion model sampling as part of the paper Sublinear iterations can suffice even for DDPMs.
This code implements the score and relative score choices for the linear factor (the so-called "SDE-adapted" choices, see C.2.2 "Concrete choices of scaling factor" of the paper). For the "network-adapted" denoiser and skip connection choices, see the nn-adapted tag.
This repository is forked from edm by Tero
Karras, Miika Aittala, Timo Aila, and Samuli Laine. The contents of that
repository (including source code and pre-trained models) are licensed
under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0
International License.
In this repository, generate.py has been modified to implement the
randomized midpoint method and example.py has been modified to work
with the latest Pillow.
Copyright © 2022, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
All material, including source code and pre-trained models, is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
baseline-cifar10-32x32-uncond-vp.pkl and baseline-cifar10-32x32-uncond-ve.pkl are derived from the pre-trained models by Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. The models were originally shared under the Apache 2.0 license.
baseline-imagenet-64x64-cond-adm.pkl is derived from the pre-trained model by Prafulla Dhariwal and Alex Nichol. The model was originally shared under the MIT license.
imagenet-64x64-baseline.npz is derived from the precomputed reference statistics by Prafulla Dhariwal and Alex Nichol. The statistics were
originally shared under the MIT license.
@misc{zhang2025sublinear,
title = {Sublinear Iterations Can Suffice Even for {{DDPMs}}},
author = {Zhang, Matthew S. and Huan, Stephen and Huang, Jerry and Boffi, Nicholas M. and Chen, Sitan and Chewi, Sinho},
year = 2025,
month = nov,
number = {arXiv:2511.04844},
eprint = {2511.04844},
primaryclass = {cs},
publisher = {arXiv},
doi = {10.48550/arXiv.2511.04844},
archiveprefix = {arXiv}
}