Intermediate46m

How Diffusion Models Work

Instructor: Sharon Zhou

Earn an accomplishment with PRO · Updated Oct 7, 2025

  • Intermediate
  • 46m
  • 8 Video Lessons
  • 5 Code Examples
  • 1 Graded Assignment PRO
  • Earn an accomplishment with PRO
  • Updated Oct 7, 2025
  • Instructor: Sharon Zhou
  • Learn more aboutMembership PRO Plan

What you'll learn

  • Understand diffusion models in use today.

  • Build your own diffusion model, and learn to train it.

  • Implement algorithms to speed up sampling 10x.

Course recap

PRO

This course covers the foundations of diffusion models for generative AI. It teaches how to train a neural network (UNet) to predict and iteratively subtract noise from pure noise to generate images. The course covers sampling techniques including the faster DDIM sampler, context conditioning for controllable generation (e.g., specifying food, spells, or hero sprites), and the model architecture details.

Concept map

Concepts in How Diffusion Models Work and the courses that connect to themDiffusion ModelsDiffusion processUNet architectureDDIM samplerContext conditioningLatent diffusionBuilding Multimodal Search and RAGBuilding Multimodal Searc…Concepts in How Diffusion Models Work and the courses that connect to themDiffusion ModelsDiffusion processDiffusion proce…UNet architectureUNet architectu…DDIM samplerContext conditioningContext conditi…Latent diffusion

Key concepts

  • Diffusion processForward process adds noise to images; reverse process (denoising) generates images from noise
  • UNet architectureNeural network that predicts noise to be subtracted at each denoising step
  • DDIM samplerMore efficient sampling method that skips steps for faster generation
  • Context conditioningAdding text or class labels to control what the model generates
  • Latent diffusionOperating on image embeddings rather than raw pixels for efficiency (used in Stable Diffusion)

Lesson highlights

  1. 1.Introduction — Overview of diffusion models
  2. 2.Noise prediction training — Training UNet to predict noise
  3. 3.Sampling — Generating images from trained models
  4. 4.DDIM sampling — Faster, more efficient sampling
  5. 5.UNet architecture — Model architecture deep dive
  6. 6.Context conditioning — Controlling generation with prompts
  7. 7.Advanced topics — In-painting, textual inversion, classifier-free guidance
  8. 8.Summary — Recap and future directions

About this course

In How Diffusion Models Work, you will gain a deep familiarity with the diffusion process and the models which carry it out. More than simply pulling in a pre-built model or using an API, this course will teach you to build a diffusion model from scratch.

In this course you will:

  • Explore the cutting-edge world of diffusion-based generative AI and create your own diffusion model from scratch.
  • Gain deep familiarity with the diffusion process and the models driving it, going beyond pre-built models and APIs.
  • Acquire practical coding skills by working through labs on sampling, training diffusion models, building neural networks for noise prediction, and adding context for personalized image generation.

At the end of the course, you will have a model that can serve as a starting point for your own exploration of diffusion models for your applications.

This one-hour course, taught by Sharon Zhou will expand your generative AI capabilities to include building, training, and optimizing diffusion models.

Hands-on examples make the concepts easy to understand and build upon. Built-in Jupyter notebooks allow you to seamlessly experiment with the code and labs presented in the course.

Who should join?

How Diffusion Models Work is an intermediate-level course. Knowledge of Python, Tensorflow, or Pytorch will help you get the most out of this course.

Course Outline

8 Lessons・5 Code Examples
Unlock certificates

Elevate your learning experience with Pro

Upgrade to Pro and gain unlimited accomplishments on your resume

Learn More

Instructor

Sharon Zhou

Sharon Zhou

Vice President of Artificial Intelligence at AMD 

Course access is free for a limited time during the DeepLearning.AI learning platform beta!

Want to learn more about Generative AI?

Keep learning with updates on curated AI news, courses, and events, as well as Andrew’s thoughts from DeepLearning.AI!