TL;DR
A diffusion model that tries to produce a large, sharp image in one go spends most of its effort on fine texture and has trouble with global layout. A cascaded diffusion model splits the job into stages. A base model generates a small image, and one or more super-resolution diffusion models each upsample the previous result and add detail. Each stage is trained on a corrupted version of its input, so it learns to correct the mistakes of the stage before it.
Builds on: Diffusion Model, Super-Resolution, U-Net · Leads to: text-to-image systems such as Imagen, which use this pipeline to reach 1024 by 1024 pixels
Where it's used
Text-to-image generation. Imagen, described by Saharia and colleagues in 2022, generates a 64 by 64 image from a text prompt with a base diffusion model, then uses two text-conditional super-resolution models to reach 256 by 256 and then 1024 by 1024. The paper reports that noise conditioning augmentation, described below, is critical for high-fidelity output.
High-resolution class-conditional images. The original cascaded paper by Ho and colleagues applies the same idea to class-conditional image generation, such as producing a specific kind of object, and reports high-fidelity samples at resolutions higher than a single diffusion model could reliably produce.
Any image pipeline where a cheap model proposes and a second model refines. A low-resolution draft can be checked and corrected at higher resolution. The stages can be trained separately, which lets a team reuse a super-resolution model with a new base model.
How it works
Trace one tiny instance with a two-stage cascade. The base model makes a 2 by 2 image, and the super-resolution model turns it into a 4 by 4 image. Brightness values are between 0 and 1.
-
The base model draws the layout. It samples a 2 by 2 image with pixel values . These four numbers are all the detail it has, and the bright pixel sits at the top left. Check: four values, one per base pixel.
-
Enlarge the draft with a fixed rule. Bilinear interpolation gives a 4 by 4 image that is smooth but blurry. Its top row is a smooth ramp that starts at the bright value and falls toward the dark value . Check: the blur is a ramp, not a sharp edge.
-
Corrupt the draft on purpose. Before the super-resolution model sees the draft, the pipeline mixes it with Gaussian noise and records the noise level, which is the augmentation level. With level coefficient and a noise draw of , the pixel becomes (the math section works this out). The model is told the level . Check: the model now sees a draft whose errors look like the ones a real base model would make.
-
Denoise and add detail. The super-resolution model is a U-Net diffusion model, conditioned on the corrupted draft and the augmentation level. Starting from noise, it denoises toward a sharp 4 by 4 image that agrees with the draft. Suppose it outputs for the corrected pixel. Check: the output is close to the draft but not identical to it, because the model has added detail.
-
Train, then check. The stage is trained on many such pairs. At each step it is penalised for predicting the wrong noise, so the layout from the base model is kept and the texture is filled in.
The key idea is in step 3. Without the corruption, the super-resolution model learns to trust its input perfectly. At test time the input is an imperfect draft, so the model would copy its errors. Training it on corrupted drafts teaches it to fix them.
flowchart LR
T["Text prompt"] --> B["Base diffusion model, 64 by 64"]
B --> E1["Bilinear enlarge to 256 by 256"]
E1 --> N1["Noise augmentation, level recorded"]
N1 --> S1["Super-resolution model, 256 by 256"]
S1 --> E2["Bilinear enlarge to 1024 by 1024"]
E2 --> N2["Noise augmentation, level recorded"]
N2 --> S2["Super-resolution model, 1024 by 1024"]
The math
A cascaded diffusion model is a sequence of conditional diffusion models , where is the image at resolution level , is the condition such as a class or a text embedding, and is the image from the previous level after noise augmentation at a level that is sampled during training and given to the model.
Step 1 in symbols: the base stage
The first model is an ordinary Diffusion Model trained on low-resolution images. It learns , and at test time we sample from it once.
Step 2 in symbols: the enlargement
The previous image is enlarged with a fixed operator , usually bilinear interpolation, so the conditioning signal is . The operator adds no information, which is why the next stage has to add detail.
Step 3 in symbols: noise augmentation
For a conditioning image and a sampled level with cumulative noise coefficient , the augmented input is
where is a draw of Gaussian noise with mean 0 and identity covariance, and is the augmented input the model sees.
This is the same forward-noising formula as in Diffusion Model, applied to the conditioning image instead of the target. The level is passed to the model, so it knows how much to trust its input. In the example, gives and , so with and the augmented value is .
Step 4 in symbols: the stage loss
Each stage is trained with the noise-prediction loss of a diffusion model, now conditioned on the augmented input and the level:
where is the target at noise step . The loss is a Mean Squared Error between the true noise and the predicted noise, computed per stage.
Step 5 in symbols: sampling
Sampling chains the stages: draw from the base model, enlarge and augment it, draw from the next stage, and so on. The approximation is that each stage only has to model the conditional distribution of detail given the layout, which is much simpler than the full joint distribution over all pixels.
Worked examples
A cascade has a base model at , one super-resolution model at , and another at .
- The base model outputs values.
- The first super-resolution model outputs values.
- The second outputs values.
- The final stage therefore produces times as many values as the base model. Each step up multiplies the pixel count by 16.
Interpretation: the expensive, high-detail work is done by the later stages, but each of them only has to add detail to a layout that is already fixed.
The conditioning value is and the level gives . Consider two draws of the augmentation noise.
- For draw one, . The coefficients are for the signal and for the noise.
- The augmented value is .
- For draw two, . The augmented value is .
- The same clean value can therefore reach the model as or , depending on the draw.
- The model is also told , so it knows the input is noisy and how noisy. It learns to predict the true detail from the noisy input and that level together.
Interpretation: a higher augmentation level makes the input less trustworthy, and the model learns to lean more on the text and the layout. That is what lets it correct a real base model's errors, which look like noise in its input.
A designer asks for a 1024 by 1024 picture of a lighthouse on a cliff at dusk, with the lighthouse on the left third.
- The base model draws the whole scene at 64 by 64, which is values. The lighthouse's position, the cliff and the sky colours are decided here.
- The 256 stage has values to fill. It adds the lighthouse's edges and the cliff's rock texture, and it must keep the layout the base model chose.
- The 1024 stage fills in fine texture, such as the wet stone and the light on the glass, while again keeping the layout.
- If the base draft put the lighthouse on the right, later stages in practice cannot move it, because each stage is conditioned on the previous image and trained to refine it, not to redraw it.
- The base model is the largest of the three networks in Imagen, so most of the capacity sits in the stage that decides the composition.
Try it: a base model's draft has a lighthouse at the wrong size, and the 256 stage must fix it. Is that a problem for a cascade? Answer: yes, in principle, because the super-resolution stages are trained to add detail to the layout they receive. A size error made at the base stage is usually carried through, so the base model is where the composition must be right.
Common mistakes and tradeoffs
It is tempting to think a cascade is only faster than one large model. In fact the main reason is quality. Splitting the task lets each stage model one scale of detail, which the papers report is needed for high-fidelity samples. Speed is a side effect of working at small resolution for most of the steps.
It is tempting to think the super-resolution stage can repair any base-model error. In fact it is trained on drafts whose errors look like noise, so it fixes local texture and edges well, but it has little power to change the layout the base model chose.
It is tempting to think that noise augmentation is an optional tweak. In fact the Imagen paper calls it critical, and the original cascaded paper shows that conditioning on the augmentation level improves sample quality. Without it, the stages copy the base model's artefacts.
When to use it: when a single diffusion model is too hard to train at the target resolution, and when the image can be built from a coarse layout and refined. When not to use it: when the output is small enough for one model, or when the whole picture must be coherent at every scale and a cascade's fixed layout would be a constraint. Alternatives include training one large model at full resolution, and latent diffusion, which runs the process in a compressed space.
History
Diffusion models became strong image generators from 2020, and they could make good samples at low resolution, but making sharp high-resolution images with one model was hard to train and expensive. The cascade idea answered this by splitting the task into scales.
Ho, Saharia, Chan, Fleet, Norouzi and Salimans showed in 2021 that cascaded diffusion models with noise conditioning augmentation could generate high-fidelity class-conditional images. Imagen in 2022 applied the same pipeline to text-to-image generation with a large frozen text encoder, and reported 1024 by 1024 samples. The idea caught on because it gave a clear way to scale quality without one enormous model, and because each stage could be trained and studied separately.
Recap
- A diffusion model at full resolution is hard to train, so the task is split across scales.
- A base model draws the layout at low resolution, and super-resolution diffusion models add detail stage by stage.
- Each stage is conditioned on the previous image after noise augmentation at a recorded level, so it learns to correct the previous stage's errors.
- The augmentation is the trick that makes the cascade work, because test-time drafts are imperfect.
- Layout is decided early, so the base model carries most of the composition, and later stages refine what it chose.
Read next: Classifier-Free Guidance, which steers the base model toward a text condition, and Score Matching, the view of diffusion models that the noise predictions connect to.
Check yourself
QuestionRecall: what does the cascade do with the output of one stage before it reaches the next?Show answer
It enlarges the output with a fixed operator, such as bilinear interpolation, then adds noise at a random augmentation level and records that level. The next stage is conditioned on this augmented image and the level.
QuestionComputation: a cascade produces a image from a base. How many times as many values does the final image have compared with the base image?Show answer
The base has values and the final image has . The ratio is .
QuestionWhy: why is noise augmentation needed, given that the super-resolution model could just be trained on clean low-resolution images?Show answer
At test time the super-resolution model receives the base model's output, which contains errors. A model trained only on clean drafts would learn to trust its input and copy those errors. Training on corrupted drafts, with the level given, teaches it to correct them.
QuestionApplied: a team wants to speed up a cascade by replacing the 64 by 64 base model with a smaller, faster model, and keeping the super-resolution stages. What is the main risk, and how would you check it?Show answer
The main risk is that the smaller base model makes worse layouts, which the super-resolution stages cannot fix, since they refine rather than redraw. You would check by generating many samples from both bases, looking at composition and prompt agreement at 64 by 64, before judging the final 1024 images.
Sources
- Ho, Saharia, Chan, Fleet, Norouzi and Salimans, "Cascaded Diffusion Models for High Fidelity Image Generation" (2021): https://arxiv.org/abs/2106.15282
- Saharia et al., "Photorealistic Text-to-Image Diffusion Models with Deep Language Understanding" (2022): https://arxiv.org/abs/2205.11487
- Ho, Jain and Abbeel, "Denoising Diffusion Probabilistic Models" (2020): https://arxiv.org/abs/2006.11239