diff --git a/README.md b/README.md new file mode 100644 index 0000000..5f55aaa --- /dev/null +++ b/README.md @@ -0,0 +1,38 @@ +# DDPM + +A Simple implementation of DDPM model in PyTorch. + +![](./images/Screenshot_20230314_225320.png) +![](./images/ezgif.com-gif-maker.gif) + +## Traning + +Before training, please set up the config.ini file: + +```ini +[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 +``` \ No newline at end of file diff --git a/images/Screenshot_20230314_225320.png b/images/Screenshot_20230314_225320.png new file mode 100644 index 0000000..e7716f7 Binary files /dev/null and b/images/Screenshot_20230314_225320.png differ diff --git a/images/ezgif.com-gif-maker.gif b/images/ezgif.com-gif-maker.gif new file mode 100644 index 0000000..361ac88 Binary files /dev/null and b/images/ezgif.com-gif-maker.gif differ