Skip to content

This may be the simplest implement of DDPM. You can directly run Main.py to train the UNet on CIFAR-10 dataset and see the amazing process of denoising.

Notifications You must be signed in to change notification settings

mileret/ddpm_cifar10

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Installation

The requirement.txt file is friendly provided. You can prepare the environment by running pip install -r requirements.txt in your command line with python=3.8.

To avoid unpredictable mistakes, you can also install python=3.8, torch=1.13.1 and other packages separately.

Inference using checkpoints

You can run the following codes to generate images using the checkpoint placed in ./ckpts.

cd codes
python Main.py --state eval --ckpt ckpt_best.pt

The generated images are saved in ./codes/SampledImgs. Note that it may take several seconds for the model to complete the denoising process.

Train your own DDPM

Run the following codes to train your own DDPM.

cd codes
python Main.py --state train

The checkpoints will be saved in ./ckpts.

References

Code Base

Denoising Diffusion Probabilistic Models

Improved Denoising Diffusion Probabilistic Models

Diffusion Models Beat GANs on Image Synthesis

About

This may be the simplest implement of DDPM. You can directly run Main.py to train the UNet on CIFAR-10 dataset and see the amazing process of denoising.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%