This repository is now merged into Lux.jl examples.
Lux.jl implementation of Denoising Diffusion Implicit Models (arXiv:2010.02502).
The implementation follows the Keras example.
The model generates images from Gaussian noises by denoising iteratively.

Install Julia and instantiate Project.toml.
Follwoing scripts are tested on a single NVIDIA Tesla T4 instance.
Download and extract Dataset images from 102 Category Flower Dataset.
$julia --project train.jl \
--dataset-dir oxford_flower_102 \ # path to dataset directory containing image files
--epochs 25 \
--image-size 96 \
--batchsize 64 \
--learning-rate 1e-3 \
--weight-decay 1e-4 \
--val-diffusion-steps 80 \
--output-dir output/train # path to save checkpoint and imagesYou can also change model hyper parameters. See main function in train.jl.
$julia --project generate.jl \
--checkpoint output/ckpt/checkpoint_25.bson \ # path to checkpoint
--image-size 96 \
--num-images 10 \
--diffusion-steps 80 \
--output-dir output/generate # path to save imagesYou can also change model hyper parameters. See main function in generate.jl.
The hyper parameters should be the same during training and generation.