Advanced level

Diffusion model

A diffusion model that learned what clothes look like from 60,000 photos. Ask for a sneaker and it starts from pure static, then removes noise step by step until a new design appears. Students build the noise schedule, the U-Net and classifier-free guidance themselves.

Where you see it
Midjourney, DALL·E, Stable Diffusion and photo-fill tools
Time to build
About 6 weeks

How it works

  1. Add noise to thousands of images and train a U-Net to predict it.
  2. Start from pure static to make a new image.
  3. Each step, remove a little noise, steered by what was asked for.
  4. After 30 steps, a brand-new design appears.

Your child learns

  • The math of diffusion, with pictures first
  • Building a U-Net and noise schedule in PyTorch
  • Conditioning and classifier-free guidance
  • Measuring image quality, and spotting generated images

Try this

  • Pick Sneaker, then Dress, and watch the shapes form
  • Drag the step slider back to step 5. Can you guess the result?
  • Set how closely it follows your request to Not at all
  • Turn on its guess of the finished image

Real image generators learn from billions of pictures on huge computers. This one runs in your browser at 16 × 16 pixels. It was trained by Lernixa teachers on the public Fashion-MNIST dataset.

Your child can build this

This project is part of Research Tutorial. Start with a free class and we will find the right level.