tqch / ddpm-torch

Unofficial PyTorch Implementation of Denoising Diffusion Probabilistic Models (DDPM)
MIT License
200 stars 35 forks source link

Meet bugs when adopting the --eval choice for training. #5

Closed mo666666 closed 1 year ago

mo666666 commented 1 year ago

Hi, tqch! Thank you for your excellent work! However, I found the code can not work well if I select the --eval arg for training. As I know, maybe there is something wrong with the sample_fn function. Can you fix this bug? Thank you very much.

tqch commented 1 year ago

Hi @mo666666, thanks for the feedback. I have updated the code accordingly in the latest commit @db49df6. Still, --eval is not recommended if not used together with --use-ddim. The reason for that is the default DDPM sampler has to go through 1000 steps, which will inevitably slow down the training process. On the contrary, DDIM sampler with quadratic skip and 50 timesteps is a good option to track the training FIDs approximately at reasonably low time cost.

mo666666 commented 1 year ago

Thank you for your reply! Your take-away message is quite helpful to me!