by Kondasamy Jayaraman

Module 25 · Diffusion

Intermediate Multimodal models recommended · by Kondasamy Jayaraman

How does a picture come out of noise?

An image model starts from random speckle and removes its best guess of the noise, step by step. Here you develop part drawings in a darkroom, count what each step costs, watch a network learn a shape, and steer it with a label.

Read as

The whole idea in one example

The same noise, developed in 1 step and in 50

1 step

roughness 0.63
The noise developed in 1 step: nearest a drill, roughness 0.63

A blurred average of every drawing.

50 steps

roughness 0.00
The noise developed in 50 steps: nearest a hinge, roughness 0.00

A clean hinge.

Both run the same toy denoiser on Larkspur’s twelve 32 × 32 part drawings. It is a toy that shows the mechanism, not any real model’s numbers.

How it works

Six ideas carry the module

  1. Noise to picture: a drawing developing from noise, step by step

    1 Noise to picture

    Start from noise; clean every pixel a little each step

    Song and colleagues (2021) describe a diffusion model as noise added gradually and then removed in reverse: “Creating noise from data is easy; creating data from noise is generative modeling.”

    Source, checked 24 October 2026

  2. 2 Step by step

    Fewer steps cost less and draw rougher

    Ho, Jain and Abbeel’s 2020 paper (DDPM) made high-quality pictures with a diffusion model. It set T = 1,000 steps for all its experiments, so sampling one picture runs the network 1,000 times.

    Source, checked 24 October 2026

  3. 3 A learned denoiser

    A network learns which way to move each dot

  4. 4 Copy or create

    The ideal denoiser copies; a network makes new points

    Carlini and colleagues (2023) showed that diffusion models memorise individual training images and emit them when generating, extracting over a thousand training examples from state-of-the-art models.

    Source, checked 24 October 2026

  5. 5 Steer with a label

    Guidance pushes toward the part asked for

    Classifier-free guidance (Ho and Salimans, 2022) trains one model with and without the label, dropping it at random, and mixes the two predictions as (1 + w) × labelled − w × unlabelled, trading sample diversity for quality.

    Source, checked 24 October 2026

  6. 6 Why it costs

    Steps × positions; latent and few-step models cut each

    Latent diffusion (Rombach et al., 2022) runs the denoiser on a pretrained autoencoder’s smaller latent picture, shrunk by a factor f each way; the paper found f of 4 to 16 a good balance, with 4 and 8 best.

    Source, checked 24 October 2026

Everything here runs live in your browser: the noise, an ideal denoiser over the drawings, and a small network trained once on the hinge’s outline. Latent diffusion shrinks the picture 8 times each way in the paper’s best settings.

The story

Larkspur’s catalogue, drawn by a model

Larkspur Supply Co. wants pictures of its parts drawn by a model: a thumbnail for search and a clean image for every catalogue page. You’re on the team that decides how many steps and how much guidance each picture gets.

Multimodal models showed how pictures go into a model; here they come out. The workbench’s best plan is one of 2 that tie.

12
part drawings the toy denoiser knows
0.01
roughness of the learned dots at 50 steps
1,000
steps a picture in the DDPM paper
93%
fewer predictions than “the most of everything” on the workbench

Your path

The chapters

  1. Chapter 1

    Noise to picture

    How does a picture come out of pure noise?

  2. Chapter 2

    Step by step

    What do you give up when you take fewer steps?

  3. Chapter 3

    A learned denoiser

    What does a network learn, if it keeps no pictures?

  4. Chapter 4

    Copy or create

    Does a denoiser copy its training pictures or make new ones?

  5. Chapter 5

    Steer with a label

    How does a label steer what the model draws?

  6. Chapter 6

    Why it costs what it costs

    What makes a diffusion picture expensive, and how do newer models cut it?

  7. Chapter 7

    Workbench: steps and guidance per picture

    How many steps and how much guidance does each picture need?

Who it’s for

  • Engineers
  • Product managers
  • Analysts
  • No code needed

Product managers, engineers and analysts choosing or paying for image generation. Multimodal models comes first; no code or maths needed.