clear-diffusion-keras icon indicating copy to clipboard operation
clear-diffusion-keras copied to clipboard

DDPM Impleemntation

Open arohi2bujji opened this issue 2 years ago • 1 comments

Did anyone implemented DDPM (Denoising Diffusion Probabilistic Models) is DDIM same as DDPM. Could anyone please confirm or share any working codes on DDPM?

arohi2bujji avatar Oct 28 '22 07:10 arohi2bujji

Hi!

The difference between DDPM and DDIM is in their sampling process, their training is the same. If you set stochasticity to 1.0 in model.py/plot_images(), and sample for more steps (100 at least), you will get images sampled according to the DDPM procedure, and it will be a valid DDPM model.

It will not be a perfect reproduction of the DDPM paper though, because there some implementation details, that are different:

  • this repo uses a smaller UNet
  • they used MSE loss instead of MAE
  • they use discrete timesteps instead of continuous time
  • they condition the network with the index of the current timestep instead of the noise power/variance
  • they use a different schedule for sampling

If you are looking for a more exact reproduction, check out this Keras code example.

beresandras avatar Dec 30 '22 08:12 beresandras