Skip to content

[CVPR-2024, Highlight, Top 2.8%] Official implementation for "Fast ODE-based Sampling for Diffusion Models in Around 5 Steps".

License

Notifications You must be signed in to change notification settings

zju-pi/diff-sampler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

diff-sampler

diff-sampler is an open source toolbox for fast sampling of diffusion models, with various model implementations, numerical-based solvers, time schedules and other features. This repository also includes official implementations of the following works:

Requirements

  • This repository is mainly built upon EDM. To install the required packages, please refer to the EDM codebase.
  • This codebase supports the pre-trained diffusion models from EDM, ADM, Consistency models, LDM and Stable Diffusion. Please refer to the corresponding codebases for package installation, if you want to load their pre-trained diffusion models.

Supported ODE Solvers for Diffusion Models

Name Max Order Source Location
Euler 1 Denoising Diffusion Implicit Models diff-solvers-main
Heun 2 Elucidating the Design Space of Diffusion-Based Generative Models diff-solvers-main
DPM-Solver-2 2 DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Steps diff-solvers-main
AMED-Solver 2 Fast ODE-based Sampling for Diffusion Models in Around 5 Steps amed-solver-main
DPM-Solver++ 3 DPM-Solver++: Fast Solver for Guided Sampling of Diffusion Probabilistic Models diff-solvers-main
UniPC 3 UniPC: A Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models diff-solvers-main
DEIS 4 Fast Sampling of Diffusion Models with Exponential Integrator diff-solvers-main
iPNDM 4 Fast Sampling of Diffusion Models with Exponential Integrator diff-solvers-main
iPNDM_v 4 The variable-step version of the Adams–Bashforth methods diff-solvers-main
AMED-Plugin 4 Fast ODE-based Sampling for Diffusion Models in Around 5 Steps amed-solver-main

Pre-trained Diffusion Models

We perform sampling on a variaty of pre-trained diffusion models from different codebases including EDM, ADM, Consistency models, LDM and Stable Diffusion. The tested pre-trained models are listed below:

Codebase Dataset Resolusion Pre-trained Models Description
EDM CIFAR10 32 edm-cifar10-32x32-uncond-vp.pkl
EDM FFHQ 64 edm-ffhq-64x64-uncond-vp.pkl
EDM ImageNet 64 edm-imagenet-64x64-cond-adm.pkl
Consistency Models LSUN_bedroom 256 edm_bedroom256_ema.pt Pixel-space
ADM ImageNet 256 256x256_diffusion.pt and 256x256_classifier.pt Classifier-guidance.
LDM LSUN_bedroom 256 lsun_bedroom.pt and vq-f4 model Latent-space
Stable Diffusion MS-COCO 512 stable-diffusion-v1-4 Classifier-free-guidance

FID Statistics

For facilitating the FID evaluation of diffusion models, we provide our FID statistics of various datasets. They are collected on the Internet or made by ourselves with the guidance of the EDM codebase.

Citation

If you find this repository useful, please consider citing the following paper:

@article{zhou2023fast,
  title={Fast ODE-based Sampling for Diffusion Models in Around 5 Steps},
  author={Zhou, Zhenyu and Chen, Defang and Wang, Can and Chen, Chun},
  journal={arXiv preprint arXiv:2312.00094},
  year={2023}
}

@article{chen2024trajectory,
  title={On the Trajectory Regularity of ODE-based Diffusion Sampling},
  author={Chen, Defang and Zhou, Zhenyu and Wang, Can and Shen, Chunhua and Lyu, Siwei},
  journal={arXiv preprint arXiv:2405.11326},
  year={2024}
}

About

[CVPR-2024, Highlight, Top 2.8%] Official implementation for "Fast ODE-based Sampling for Diffusion Models in Around 5 Steps".

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published