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
β€οΈ 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




