advanced Estimated learning time: 8 h

6.19 Generative models: GANs and diffusion

You can explain how an image generator works, end to end.

Before:05. Classical Machine LearningUnlocks:07. Natural Language Processing11. The ECE Bridge — Signals, Edge & Embedded AI

GANs pit a generator against a discriminator; diffusion models corrupt data with noise and learn to reverse the corruption, and they now dominate image generation, with DDPM and DDIM sampling and classifier-free guidance as the practical levers. It sits in the generative run as the mechanism topic. The expectations are set honestly: GAN training misbehaves by nature — mode collapse and instability are the norm — which is a large part of why diffusion won.

Work through these

  • GAN objective, mode collapse, training instability

    Two networks competing, one generating and one judging, with well-known training difficulties including the generator collapsing to a few outputs. These problems are why the field largely moved on.

  • Diffusion: forward noising, reverse denoising

    Gradually adding noise to data and learning to reverse the process, which turns generation into repeated denoising. It is a strikingly different idea and it trains far more stably.

  • DDPM, DDIM sampling, classifier-free guidance

    The standard training formulation, faster sampling variants, and the technique that lets the strength of conditioning be dialled up. These three are what make text-conditioned generation practical.

  • Latent diffusion and text conditioning

    Running the process in a compressed space rather than on pixels, with text steering it. This is the architecture behind the current generation of image tools.

Sign in to keep your progress.

Free resources

Links last checked 29 Aug 2026.

Stuck here?

Ask a mentor. A real person answers, and they can see exactly which topic you're on. Usually within a couple of working days.

Checking your session…

Topics shown in module order.