TL;DR
A diffusion model makes a sample by running its denoiser many times, so a good picture can cost hundreds or thousands of network calls. Progressive distillation cuts that cost in rounds. In each round, a student model is trained to reach in one DDIM step the point that its teacher reaches in two. Then the student becomes the new teacher and the process repeats, so the number of steps halves every round.
Builds on: Diffusion Model, DDIM Sampler, Knowledge Distillation · Leads to: Consistency Model, v-Prediction
Where it's used
Interactive image generation. A product that shows a picture while a user waits needs an answer in about a second. A model that takes a thousand steps is too slow for that. A distilled model that takes four or eight steps can meet the budget on one GPU, and the quality gap to the slow teacher is often small enough to accept.
Video generation. A video model denoises a whole clip per step, so each step costs far more than an image step. Cutting the step count is the main lever for making clip generation practical, and distillation is one of the standard ways to do it.
Comparing samplers. Researchers use the same idea to test how many steps a trained model really needs. Distilling a model to fewer and fewer steps and measuring quality at each stage shows where the quality curve starts to fall.
How it works
Take a teacher that samples in DDIM steps. The goal is a student that samples in steps. Here is one training update on one tiny instance, with round numbers chosen for the walkthrough (they are illustrative, not from any model).
- Start with a teacher. It is a trained denoiser that, given a noisy point and a step , predicts the noise. Running it with DDIM takes a point at one noise level to a point at the next level down. Suppose the teacher's DDIM steps move a point from noise level to level in two moves.
- Pick a training point. Choose a noise level and a noisy point . Nothing else about the point matters for this walkthrough.
- Ask the teacher for its two-step answer. Run the teacher twice, once from to and once from to . Suppose the result is . Check: the teacher's answer is the target the student has to hit.
- Turn that answer into a one-step target. Ask: what clean estimate , used in a single DDIM step from , lands exactly on ? The algebra in the next section gives . Check: a single step from with does land on .
- Let the student predict. The student is a copy of the teacher, initialised to the same weights. Suppose on this point it predicts a clean estimate of . Its one-step output would then be , not . The squared error on the clean estimate is , and a gradient step pushes the student's prediction toward .
- Repeat, then swap roles. After many such updates across many points and noise levels, the student's single step matches the teacher's two steps. The student now has steps. It becomes the teacher for the next round, which trains a student with steps, and so on.
flowchart LR A["Teacher: N steps"] --> B["Student trained to match 2 teacher steps with 1"] B --> C["Student: N/2 steps"] C --> D["Becomes teacher"] D --> E["Next round: N/4 steps"]
The math
Step 3 in symbols: the teacher's two-step target
Let denote one deterministic DDIM step of the teacher. Write for the cumulative noise-retention factor at step (from the diffusion model lesson). Starting from , the teacher's two-step endpoint is
Nothing about requires new training. It is a function of the teacher alone.
Step 4 in symbols: the one-step clean-estimate target
A single DDIM step from to level , using the clean estimate and the noise direction implied by it, is
Collect the terms in . Define , , and . Then . Setting and solving gives the one-step target
In the walkthrough, and , so , , and . Then , and with , :
Step 5 in symbols: the training loss
The student is trained to predict the target by a squared error, weighted by a function of the noise level :
The paper uses a particular weighting, and the walkthrough sets so the arithmetic stays visible. The walkthrough gives . Training averages this over sampled points and noise levels, which is ordinary distillation: the teacher's behaviour is the target, and the loss is the squared gap to it. The mean squared error loss is the same kind of quantity.
Step 6 in symbols: the halving schedule
Let the sampler start with a grid of steps. After rounds the student uses steps. To reach steps from , the number of rounds is
This is exact only when is a power of two. Otherwise the grid is chosen so each round halves it as closely as possible.
Worked examples
Use the numbers from the walkthrough: , , , and the teacher's two-step endpoint .
- Compute and .
- Compute and .
- Compute .
- Compute .
- Compute the numerator .
- Divide: .
- Check by running the step forward. The noise direction is . The new point is . The check passes.
Interpretation: the single step is exact when the student predicts the clean value . A student predicting misses by at the new level, and that gap is what the loss is pushing down.
A teacher samples in steps, and the goal is steps.
- The ratio is .
- Write , so .
- Check by halving: . That is seven arrows, so seven rounds.
Interpretation: the schedule needs seven separate student trainings. Each one is a full training run, so the total cost is the sum over rounds, not just the last one. A short schedule is therefore cheaper per sample but not free to build.
Suppose one network call takes seconds on a given GPU (an illustrative figure). A teacher with steps then needs seconds per image. A student distilled to steps needs seconds.
- Speedup: .
- A product that must answer in about second is therefore within reach with the distilled model and out of reach with the teacher.
- The quality question is separate. The speedup says nothing about how close the -step samples are to the -step ones, and that has to be measured on held-out data.
Try it: a -step teacher is distilled down to steps, and each call takes seconds. How long does the student take, and how many rounds does distillation need? Answer: seconds. The ratio , so rounds.
Common mistakes and tradeoffs
It is tempting to think a distilled model is just a faster copy of the teacher that behaves the same; in fact it is a different function trained to match the teacher only at the points the training sees. The student can be wrong on rare noise levels or prompts that the sampling schedule rarely visits, because nothing in the loss pushes it there. Measure quality across the full range of steps you plan to use.
It is tempting to think each round costs little because it only halves the steps; in fact each round is a full training run that must cover all noise levels, and errors compound. A student that is slightly off becomes the next teacher, and its mistakes become the next round's target.
It is tempting to think more rounds always help; in fact the quality curve usually falls off as the step count drops, and past some point the extra rounds give worse samples than the round before. The right stopping point depends on the quality target and the latency budget.
When to use it: you have a good teacher, you need few-step sampling, and you can afford the training runs. When not to use it: you only need a few samples offline, or you cannot afford to train, since the teacher's own sampler is then cheaper overall. Alternatives: training a consistency model directly, which learns to map any noise level to the clean endpoint, and using a better sampler such as DDIM with fewer steps and no training at all.
History
Samplers for diffusion models were slow from the start, because the first working versions walked the reverse chain one step at a time through the Denoising Diffusion Probabilistic Models (DDPM) process. In 2020 Song, Meng and Ermon showed that the same trained network could be sampled along a deterministic path with fewer steps, which made step-skipping practical without retraining. That work is the DDIM sampler this lesson builds on.
Distilling a teacher into a smaller student had been known since Hinton, Vinyals and Dean's 2015 paper, which used soft targets from a large model. Salimans and Ho combined the two ideas in 2022, in work presented at ICLR that year. Their contribution was the round structure: each round halves the step count, and the student of one round is the teacher of the next. It caught on because it needed no change to the trained architecture and produced few-step samplers from models that already existed.
Recap
- A diffusion sampler is slow because it makes one network call per step.
- DDIM lets a trained model be sampled along a shorter path, so fewer steps are possible without retraining.
- Distillation trains a student to match a teacher's output, here the teacher's two steps in one student step.
- Repeating the halving turns a long schedule into a short one, one round at a time, and the student of each round becomes the next teacher.
- Read next: Consistency Model for a direct route to few-step sampling, and v-Prediction for the parameterisation used in many distilled models.
Check yourself
QuestionIn one sentence, what does one round of progressive distillation train the student to do?Show answer
The student is trained so that one DDIM step from a noisy point lands where the teacher's two DDIM steps land. Because the student then needs half as many steps, each round halves the sampling schedule.
QuestionA teacher samples in steps and is distilled to steps by halving. How many rounds are needed?Show answer
The ratio is , so rounds are needed. Halving from goes , which is seven halvings.
QuestionWhy can a distilled student be wrong on noise levels that the sampling schedule rarely visits, even if its loss is low on the levels it was trained on?Show answer
The loss is averaged over the points the training samples, so it only constrains the student where those points fall. Nothing in the objective forces the student to match the teacher at other noise levels, so errors can remain there and show up when those levels are used at sampling time.
QuestionA product must return an image within one second, and one network call takes 0.1 seconds. Is a 40-step teacher fast enough, and would a 4-step student be?Show answer
A -step teacher takes seconds, which is too slow. A -step student takes seconds, which fits the budget. Whether the student is good enough also depends on its measured quality, not only its speed.