← All courses

Stable Diffusion: from Practice to Understanding from the Inside (fast.ai)

Run Stable Diffusion through `diffusers` and control generation: prompts, negative prompts, guidance scale, img2img, seed. Explain and manually assemble the pipeline from its components: the CLIP text encoder, the VAE autoencoder, UNet, and the scheduler. Understand the mathematical essence of diffusion models: noising, noise prediction, and the connection to the score function.

Log in to start →

Course preview

What you will learn

Explore the full curriculum before you enrol. Lessons unlock after purchase or free enrolment.

01

Introduction and Running Stable Diffusion

Topics covered

  • Run Stable Diffusion through the `diffusers` library in Colab or locally.
  • Master the core generation controls: prompt, negative prompt, guidance scale, number of steps, seed.
  • Try img2img mode and understand how textual inversion differs from Dreambooth.
1 lesson10 questions~25 min
02

Stable Diffusion from the Inside: CLIP, VAE, UNet, and Schedulers

Topics covered

  • Assemble the Stable Diffusion pipeline by hand from four separately loaded components.
  • Understand the role of each block: the CLIP text encoder, the VAE autoencoder, UNet, the scheduler.
  • Trace the path of text from a string to embeddings and learn to intervene in it.
1 lesson10 questions~25 min
03

The Essence of Diffusion and Training a Diffusion Model from Scratch

Topics covered

  • Understand the conceptual basis of diffusion models without relying on ready-made libraries.
  • Connect "noise prediction" to the idea of a gradient over the data (the score function).
  • Understand how the training process is structured: noising, the objective, the noise schedule.
1 lesson10 questions~25 min
04

Writing Your Own Sampler and Improving Generation

Topics covered

  • Write a sampling loop from scratch, without relying on ready-made schedulers.
  • Understand the differences between sampler families (DDPM, DDIM, Euler, ancestral variants) at the level of ideas.
  • Learn to experiment: measure the effect of changing the noise schedule, number of steps, and guidance.
1 lesson10 questions~25 min
05

Capstone Project

Topics covered

  • Combine all the course's skills into a completed independent piece of work.
  • Demonstrate an understanding of SD's architecture at the level of "I can modify it", not just "I can run it".
  • Present the result in a form suitable for a portfolio.
1 lesson10 questions~25 min
06

Final Exam

Final exam
35 questions~60 min