The code has been tested on PyTorch 1.7.
python main.py --config {DATASET_NOISE}.yml --exp {PROJECT_PATH} --doc {MODEL_NAME} --ni
We provide 6 config files for Celeba and Church to train with gaussian noise and gamma noise.
python main.py --config {DATASET_NOISE}.yml --exp {PROJECT_PATH} --doc {MODEL_NAME} --sample --fid --timesteps {STEPS} --eta {ETA} --ni
where
ETA
controls the scale of the variance (0 is DDIM, and 1 is one type of DDPM).STEPS
controls how many timesteps used in the process.MODEL_NAME
finds the pre-trained checkpoint according to its inferred path.
Use --interpolation
option instead of --fid
.
Use --sequence
option instead.
The above two cases contain some hard-coded lines specific to producing the image, so modify them according to your needs.
This implementation is based on the code at https://github.com/ermongroup/ddim