- The code comes from Labml, a very clear DDPM implementation, I moved the code here mainly for learning, and added some comments to the code.
- The original paper Denoising Diffusion Probabilistic Models, i also highly recommend a very good DDPM explanatory article from Google : Luo C. Understanding diffusion models: A unified perspective .
- The main structure of the model
-
Unet : Used to generate
, which is based on and a random index step that for get the time step embedding . - For
, you can get it by flowing formula : - The loss
- For more details of the model, please refer to
-
Unet : Used to generate