Diffusion Models Beat GANs on Image Synthesis | ML Coding Series | Part 2

From the creator

❤️ Become The AI Epiphany Patreon ❤️ https://www.patreon.com/theaiepiphany 👨‍👩‍👧‍👦 Join our Discord community 👨‍👩‍👧‍👦 https://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: https://github.com/openai/guided-diffusion ✅ My issue: https://github.com/openai/guided-diffusion/issues/51 ✅ Paper: https://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 - https://www.patreon.com/theaiepiphany One-time donation - https://www.paypal.com/paypalme/theaiepiphany Huge thank you to these AI Epiphany patreons: Eli Mahler Petar Veličković ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ 💼 LinkedIn - https://www.linkedin.com/in/aleksagordic/ 🐦 Twitter - https://twitter.com/gordic_aleksa 👨‍👩‍👧‍👦 Discord - https://discord.gg/peBrCpheKE 📺 YouTube - https://www.youtube.com/c/TheAIEpiphany/ 📚 Medium - https://gordicaleksa.medium.com/ 💻 GitHub - https://github.com/gordicaleksa 📢 AI Newsletter - https://aiepiphany.substack.com/ ▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬ #diffusion #generativemodeling #coding

Choose to Build with AI
Matched to OpenAI

AI Maker Residence 3

The third AI workshop taught by our legendary teacher, Nick Sarafa. This is a full-day hands-on training workshop for purposeful co-creation with AI using Claude Code. Imagine having access to hundreds of billions of dollars of computing power and knowing exactly how to make it work for you through the power of super intelligence.

◆ Fri 09 Oct 2026 ◆ KOKO Cafe, London ◆ With Nick Sarafa
AI Maker Residence 3
Live event
AI Maker Residence 3
Fri 09 Oct 2026

More like this

Running one yourself?

List your AI event,
wherever it is.

A meetup, a workshop, a hackathon, a conference. Any city, or online. Tell us about it and it lands in front of people already learning this stuff.