Uploaded July 2022 | Updated September 2026, 1 week ago
β€οΈ Become The AI Epiphany Patreon β€οΈ
patreon.com/theaiepiphany
π¨βπ©βπ§βπ¦ Join our Discord community π¨βπ©βπ§βπ¦
discord.gg/peBrCpheKE
4th video in the ML coding series! In this one I continue explaining diffusion models! I cover the "Diffusion Models Beat GANs on Image Synthesis" paper and the code behind it.
I focus on how classifier guidance works. I cover both the training of the noise-aware classifier as well as the actual sampling (the mean shift method). I also walk you through a minor bug in their code.
Let me know how you find this format!
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
β GitHub: github.com/openai/guided-diffusion
β My issue: github.com/openai/guided-diffusion/issues/51
β Paper: arxiv.org/abs/2105.05233
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
βοΈ Timetable:
00:00:00 Intro
00:01:30 Paper overview part - U-Net architecture improvements
00:05:38 Classifier guidance explained
00:15:18 Intuition behind classifier guidance
00:20:10 Scaling classifier guidance
00:24:10 Diversity vs quality tradeoff and future work
00:26:15 Coding part - training a noise-aware classifier
00:35:35 Main training loop
00:44:26 Visualizing timestep conditioning
00:46:00 Sampling using classifier guidance
00:52:35 Core of the sampling logic
00:59:20 Shifting the mean - classifier guidance
01:05:03 Minor bug in their code and my GitHub issue
01:07:53 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 #generativemodeling #coding
β€οΈ Become The AI Epiphany Patreon β€οΈ
patreon.com/theaiepiphany
π¨βπ©βπ§βπ¦ Join our Discord community π¨βπ©βπ§βπ¦
discord.gg/peBrCpheKE
4th video in the ML coding series! In this one I continue explaining diffusion models! I cover the "Diffusion Models Beat GANs on Image Synthesis" paper and the code behind it.
I focus on how classifier guidance works. I cover both the training of the noise-aware classifier as well as the actual sampling (the mean shift method). I also walk you through a minor bug in their code.
Let me know how you find this format!
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
β GitHub: github.com/openai/guided-diffusion
β My issue: github.com/openai/guided-diffusion/issues/51
β Paper: arxiv.org/abs/2105.05233
β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬β¬
βοΈ Timetable:
00:00:00 Intro
00:01:30 Paper overview part - U-Net architecture improvements
00:05:38 Classifier guidance explained
00:15:18 Intuition behind classifier guidance
00:20:10 Scaling classifier guidance
00:24:10 Diversity vs quality tradeoff and future work
00:26:15 Coding part - training a noise-aware classifier
00:35:35 Main training loop
00:44:26 Visualizing timestep conditioning
00:46:00 Sampling using classifier guidance
00:52:35 Core of the sampling logic
00:59:20 Shifting the mean - classifier guidance
01:05:03 Minor bug in their code and my GitHub issue
01:07:53 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 #generativemodeling #coding










