Ultimate Guide to Diffusion Models | ML Coding Series | Denoising Diffusion Probabilistic Models

Опубликовано: 11 Май 2026
на канале: Aleksa Gordić - The AI Epiphany
44,881
1k

❤️ Become The AI Epiphany Patreon ❤️
  / theaiepiphany  

👨‍👩‍👧‍👦 Join our Discord community 👨‍👩‍👧‍👦
  / discord  

In this 3rd video of my ML coding series, we do a deep dive into diffusion models! Diffusion is the powerhouse behind recent text-to-image generation models such as OpenAI's DALL-E 2, Google's Imagen, etc.

I first give you some context by going over 2 seminal diffusion papers:
Denoising Diffusion Probabilistic Models
Improved Denoising Diffusion Probabilistic Models

And then we dig deep into the actual code analysis comparing mathematical formulas behind diffusion with actual code implementation.

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
✅ DDPM paper: https://arxiv.org/abs/2006.11239
✅ Improved DDPM paper: https://arxiv.org/abs/2102.09672
✅ Improved DDPM code: https://github.com/openai/improved-di...
▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

⌚️ Timetable:
00:00:00 (Paper) Denoising Diffusion Probabilistic Models
00:16:00 (Paper) Improved DDPMs
00:23:10 (Coding starts) Training DDPMs
00:24:50 UNet model creation walk-through
00:35:05 Gaussian Diffusion model creation walk-through
00:43:50 Training loop
00:56:08 Computing noise and variance (forward prop through UNet)
01:04:00 Variational lower bound loss
01:17:25 MSE loss
01:19:23 Sampling from diffusion models
01:26:50 Sampling an actual image
01:28:03 Outro

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
💰 BECOME A PATREON OF THE AI EPIPHANY ❤️

If these videos, GitHub projects, and blogs help you,
consider helping me out by supporting me on Patreon!

The AI Epiphany -   / theaiepiphany  
One-time donation - https://www.paypal.com/paypalme/theai...

Huge thank you to these AI Epiphany patreons:
Eli Mahler
Petar Veličković

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

💼 LinkedIn -   / aleksagordic  
🐦 Twitter -   / gordic_aleksa  
👨‍👩‍👧‍👦 Discord -   / discord  

📺 YouTube -    / theaiepiphany  
📚 Medium -   / gordicaleksa  
💻 GitHub - https://github.com/gordicaleksa
📢 AI Newsletter - https://aiepiphany.substack.com/

▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬

#diffusion #ddpm #coding