Go to file
2023-03-14 23:28:08 +08:00
images docs: add readme 2023-03-14 23:28:08 +08:00
.gitignore docs: update .gitignore 2023-03-14 23:21:22 +08:00
ddpm.py docs: delete useless comment 2023-03-14 23:19:21 +08:00
README.md docs: add readme 2023-03-14 23:28:08 +08:00
sample.py style: use configparser to manage config file 2023-03-14 23:20:32 +08:00
train.py style: use configparser to manage config file 2023-03-14 23:20:32 +08:00
training.ini style: use configparser to manage config file 2023-03-14 23:20:32 +08:00
unet.py fix: add dropout layer into unet model 2023-03-14 18:18:13 +08:00

DDPM

A Simple implementation of DDPM model in PyTorch.

Traning

Before training, please set up the config.ini file:

[unet]
batch_size = 256
time_emb_dim = 128
device = cuda
epoch_num = 500
learning_rate = 1e-4

[ddpm]
iteration = 500

To start training, run:

$ python train.py

Sampling

To generate 16 pictures, run the following command:

The pictures will be output to the ./output directory.

$ python sample 16