TL;DR
A diffusion model makes samples by solving a differential equation from noise back to data, and that takes many network calls. A consistency model learns a function that takes any point on one of those trajectories and returns the trajectory's starting point, which is the clean sample. Because every point on the same trajectory must map to the same answer, the model can produce a sample in one call, and can trade extra calls for better quality.
Where you'll see it: fast image generation from diffusion-style models, where cutting the sampler from dozens of steps to one or two matters for latency, and zero-shot editing such as inpainting or super-resolution done by iterating the same function.
Intuition
Every point on a path leads to the same place
Imagine water flowing down a hillside with many channels. Each drop of water follows a path from its starting point on the ridge to a single valley at the bottom. Now suppose you could place a sign at every point on the hill that says where that point's water will end up. Two drops on the same channel would have the same sign. If you could read a sign from any point, you would not have to walk the channel to find the valley.
A consistency model is that sign. The "hill" is the space of noisy images. The "channels" are trajectories of a probability-flow equation that carries a noisy image back to a clean one. The "valley" is the clean image the trajectory started from. The model is trained so that every noisy point on a trajectory gets the same answer.
Why this speeds things up
A diffusion model computes its answer by following the channel in many small steps, each needing a network call. Its accuracy depends on how many steps it takes. A consistency model skips the walk: given a noisy image at the top of the hill, one call gives the valley. If you want more quality, you can read the sign at a point partway down, add a little noise to push the point back up to a random place on the hill, and read the sign again. Each extra read is an extra call that buys quality.
flowchart LR A[Noise x_T] -->|one call| Z[Clean sample x_eps] B[Point x_t on trajectory] -->|same answer| Z C[Point x_t prime on same trajectory] -->|same answer| Z
The math
Setup: the probability-flow ODE
Let be the data distribution. Following the continuous-time diffusion formulation of Song and colleagues, add noise with the SDE that has zero drift and noise scale . The noisy distribution at time is then
where is convolution. Time runs over with a small and a large . At the distribution is close to , which is easy to sample.
The forward noise process has a deterministic counterpart, the probability-flow ODE. Its solution trajectories, run from time down to , have the same marginal distributions as the noising process:
The term is the score. A diffusion model learns an approximation and then solves the ODE numerically, using many steps. Solving it from backward to produces a sample.
The consistency function
Given a trajectory of the probability-flow ODE, the consistency function is
It satisfies self-consistency: for any two points on the same trajectory, .
A consistency model is a neural network trained to approximate . Two constraints follow from the definition. The first is the boundary condition: at the function must return its input, , because the trajectory has already ended there. Every design has to respect this, and it is the most restrictive architectural requirement.
Parameterisation that meets the boundary condition
A simple way to enforce the boundary condition is a skip connection. Let be any free-form network with the same output size as , and set
with and . The paper uses, with ,
Both have the required values at , and the form resembles diffusion-model denoisers, so their architectures can be reused.
Sampling
One step: draw and return .
Multistep: pick decreasing times . Start from . For each , add fresh noise to move back up the hill, with , and then apply . Each application is one network call; more calls usually give better samples.
Training by consistency distillation
When a pre-trained score model is available, the trajectory can be sampled in adjacent pairs. Choose a discretisation . Given a data point and an index , form , then take one ODE step back to with a solver . For Euler, , so
The two points lie on the same trajectory up to the solver's error, so the model should give them the same output. The distillation loss is
where is a distance such as the squared norm, is a weighting, and is a target network. The target is updated as an exponential moving average of the online weights, , and gradients do not flow through it. The paper reports that the moving average and stop-gradient work better than setting .
Training in isolation
Without a pre-trained score, the score at can be estimated from data. Given and , the quantity is an unbiased estimate of conditioned on . Substituting this for the score in the Euler step gives a consistency-training loss that uses no teacher. It pairs with using the same noise in both, so the pair stays on one noise path.
Worked examples
Take a dataset that is a single point . Its noisy distributions are , so the score is . The probability-flow ODE becomes
Let . Then , so for a constant . Every trajectory is a straight line .
- A trajectory through the point at has .
- Its endpoint at is .
- The consistency function for this trajectory is . Check: .
- Another point on the same trajectory, at , gives . Same answer, as self-consistency requires.
- Boundary condition: .
Interpretation: a single point is the simplest case, but the structure is general. A consistency model is trying to learn a function like for a real data distribution, where no closed form exists. This toy shows what the target looks like, and that the two constraints are satisfiable.
Take one adjacent pair of times, and . Suppose the noisy point is and the pre-trained score there is (in one dimension, for simplicity).
- Euler increment: .
- Move to the earlier time: .
- Sanity check: the ODE slope is per unit time, and we moved back by one unit, so the value fell by .
- Suppose the online model gives and the target model gives . With squared distance, the loss for this pair is .
- The gradient step moves so the two outputs agree.
Interpretation: the target is not a label from data. It is the model's own answer one step later, made consistent with the teacher's score. Repeating this over many pairs teaches the sign-on-every-point behaviour.
Tradeoffs and failure modes
| Situation | What goes wrong | Better choice |
|---|---|---|
| One-step sample quality matters most | A single call can be blurrier than a long solver run | Use two or more steps with fresh noise between calls |
| A strong teacher is available | Distillation depends on the teacher's score errors | Distill from the teacher; the paper reports this beats earlier distillation methods on its benchmarks |
| No teacher, or the goal is an independent generator | Training in isolation can be less stable and needs careful weighting | Consistency training, with an EMA target and a tuned schedule of step counts |
| Very large step gaps | The pair is far apart on the trajectory and the solver error grows | Use more discretisation steps, or a continuous-time loss |
| Architecture cannot satisfy the boundary condition | Training fails near | Use the skip-connection parameterisation |
| Quality may not keep improving with more steps | Multistep sampling re-injects fresh noise between calls | Choose the step count by measuring quality, not by assuming more is better |
The main risk is that self-consistency is enforced only on sampled pairs, so the model can be consistent on the pairs it sees and inconsistent elsewhere. The EMA target and the choice of time discretisation both affect how much this happens. A second risk is that quality metrics such as FID reward some sampling choices more than others, so a fair comparison needs the same number of network calls.
History
Diffusion models grew out of earlier score-matching and denoising work. Ho, Jain and Abbeel's 2020 paper made the denoising formulation practical for images, and Song and colleagues in 2021 gave the continuous-time view with the probability-flow ODE. That view showed a deterministic path from noise to data, which made fast sampling a question about numerical ODE solvers.
Two lines of work tried to make sampling faster. Better solvers reduced the number of steps. Distillation trained a student to match several teacher steps in one. Progressive distillation, by Salimans and Ho in 2022, was the main earlier distillation method that did not need a large dataset of teacher samples.
Song, Dhariwal, Chen and Sutskever introduced consistency models in 2023. Their central move was to train on self-consistency directly, so one network call could replace a whole solver trajectory. They reported results on CIFAR-10 and ImageNet at 64 by 64 resolution, with one-step FID of 3.55 on CIFAR-10 and 6.20 on ImageNet 64 by 64, and two-step FID of 2.93 and 4.70 respectively, numbers taken from the paper's introduction. The paper also trains consistency models as standalone generators with no pre-trained diffusion model.
Check yourself
QuestionIn the toy example, the trajectory through at has endpoint 2. What value must the consistency function return at , and why?Show answer
It must return 2. Both points lie on the same probability-flow trajectory, and self-consistency requires that every point on a trajectory map to the same endpoint. Computing confirms it.
QuestionWhy does the skip-connection parameterisation with and guarantee the boundary condition, regardless of what the network outputs?Show answer
At the output is . The term multiplied by vanishes whatever returns, so the network's output cannot break the boundary condition. The network is free everywhere else.
QuestionIn the Euler distillation example, the trajectory moves back by one unit of time and the ODE slope is 2.0. Why does the earlier value come out lower, and what would change if the step went forward instead?Show answer
The slope is positive, so moving to an earlier time (from 10 to 9) decreases the value by . Going forward in time would reverse the sign of the time difference and increase the value by the same amount. The solver uses the direction of the time step, which is why the formula multiplies by .
QuestionA team wants one-step generation to be as good as possible and asks whether to add more sampling steps. What does the paper's setup suggest, and what is the trade-off?Show answer
Adding a second step, with fresh noise between calls, improves quality; the paper reports FID falling from 3.55 to 2.93 on CIFAR-10 in that change. The trade-off is one more network call per sample, so latency roughly doubles. The team should measure quality against the number of calls it can afford, rather than assume that more calls are always better.