Ultimate Guide to Diffusion Models | ML Coding Series | Denoising Diffusion Probabilistic Models @TheAIEpiphany
Ultimate Guide to Diffusion Models | ML Coding Series | Denoising Diffusion Probabilistic Models  @TheAIEpiphany
Uploaded July 2022 | Updated September 2026, 1 week ago
❀️ Become The AI Epiphany Patreon ❀️
patreon.com/theaiepiphany

πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Join our Discord community πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦
discord.gg/peBrCpheKE

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: arxiv.org/abs/2006.11239
βœ… Improved DDPM paper: arxiv.org/abs/2102.09672
βœ… Improved DDPM code: github.com/openai/improved-diffusion
β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

⌚️ 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 - patreon.com/theaiepiphany
One-time donation - paypal.com/paypalme/theaiepiphany

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

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

πŸ’Ό LinkedIn - linkedin.com/in/aleksagordic
🐦 Twitter - twitter.com/gordic_aleksa
πŸ‘¨β€πŸ‘©β€πŸ‘§β€πŸ‘¦ Discord - discord.gg/peBrCpheKE

πŸ“Ί YouTube - youtube.com/c/TheAIEpiphany
πŸ“š Medium - gordicaleksa.medium.com
πŸ’» GitHub - github.com/gordicaleksa
πŸ“’ AI Newsletter - aiepiphany.substack.com

β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬β–¬

#diffusion #ddpm #coding
Ultimate Guide to Diffusion Models | ML Coding Series | Denoising Diffusion Probabilistic ModelsDay 2: Replicating Metas NLLB - primary & mined data (Pt. 3)Day 11: Open NLLB - FSDP, on-boarding as a new-joiner (Pt 3.)Neural Search with Jina AI | Open-source ML Tool ExplainedJarvis for Images! (demo) - run locally, no external APIsUnderstanding over-squashing and bottlenecks on graphs via curvature | Ricci Flow | Paper Explained
Aleksa Gordić - The AI Epiphany |

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

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER