Models & Parameters

How a Diffusion Model Works, and What Each Setting Does

Also called what is a diffusion model, how do diffusion models work, latent diffusion, video diffusion, diffusion vs gan, denoising diffusion

A diffusion model generates by starting from random noise and removing a little of it at a time, predicting at each step what the image would look like with less noise, guided by your prompt. Training teaches it to reverse a gradual noising process, and that step-by-step structure is what makes the output steerable.

The core idea, in the order it happens

Training runs forwards. Take a real image, add a little noise, add a little more, and keep going until nothing is left but static. At each level the network is shown the noisy image and asked to predict the noise that was added. That is the whole training objective, and it is much easier to optimise than an adversarial game, which is why this approach scaled to billions of images.

Generation runs the same ladder backwards:

  1. Start from a field of random noise, fixed by the seed.
  2. Ask the network what noise it sees, given the prompt conditioning.
  3. Subtract part of that prediction, landing on a slightly cleaner state.
  4. Repeat for the number of steps you set.
  5. Decode from latent space back to pixels.

Two consequences matter in daily use. First, the picture is decided early: composition and subject settle in the first few steps, and later steps mostly resolve texture. That is why a bad layout cannot be fixed by adding steps. Second, because there are many steps, there are many opportunities to intervene, which is where every control you have comes from.

What each setting is actually doing

SettingEffectTypical range
StepsNumber of denoising increments20 to 40, or 1 to 8 on distilled models
Guidance (CFG)Prompt pull per step4 to 8 on most image models
SeedThe starting noise fieldFix it for reproducibility
Denoising strengthHow far your input image is pushed back into noise0.2 to 0.4 for variations, 0.6+ to reinvent
SchedulerStep size distribution and noise reinjectionModel dependent

The two most common mistakes come from treating steps and guidance as quality dials. Steps are a convergence budget, not a quality slider: once the image has converged, more steps produce an identical result at a higher cost. Guidance is a tradeoff, not a strength setting: pushing it up buys prompt adherence and pays in contrast, saturation and hard edges.

Video diffusion is a different problem

A video diffusion model has to denoise a stack of frames that agree with each other. Independent per-frame denoising would give you flicker, so these models add temporal layers, treat time as a third compression axis in the autoencoder, or use a transformer backbone that attends across frames as well as within them.

That is why video generation is so much more expensive, why clips are capped at a handful of seconds, and why the frames near the end of a clip drift more than the frames near the start. It also explains the sharpest control lever available: supplying a first frame removes the appearance decision from the model entirely and leaves it to solve motion only.

How to read all this into practice

Match the setting to the model, not to a rule of thumb. A turbo variant at 30 steps and CFG 8 will look worse than the same model at 6 steps and CFG 2. Model cards exist for a reason.

Diagnose before you re-roll. Soft or unresolved means too few steps. Burnt and oversaturated means guidance too high. Off-prompt means guidance too low or a prompt too long for the text encoder. Wrong composition means seed or a missing control input, not settings.

Change one thing at a time, with the seed fixed. With the seed left random, every comparison is confounded by a new noise field, which is the fastest way to draw a false conclusion about a setting.

The prompt for this

A starting point that reliably produces the effect. Adjust the subject and setting; keep the technical clauses.

A greenhouse at night lit only by a hanging work lamp, condensation on the glass, 35mm, slow push in

Try Diffusion Model yourself

Open the generator with a starting point already filled in.

Frequently asked questions

How do diffusion models work in simple terms?
During training, images are progressively corrupted with noise and the network learns to predict what was added. At generation time you run that backwards: start from pure noise and subtract the predicted noise step by step, with your prompt steering each subtraction, until an image emerges.
How many steps should I use?
Most models converge between 20 and 40 steps, and past roughly 50 the difference is not visible. Distilled and turbo variants are trained for 1 to 8 steps and look worse if you push them higher. If output looks soft or unfinished, raise steps; if it looks fine, extra steps only cost money.
What does guidance scale (CFG) do?
It sets how hard the prompt pulls each step away from an unconditioned prediction. Low values wander off-prompt, high values produce oversaturated, hard-edged, burnt-looking images. Most image models sit best between 4 and 8, and many newer ones want lower values than older ones.
What is latent diffusion?
Diffusion run inside a compressed latent space instead of on raw pixels, with an autoencoder handling the conversion in and out. It cut the compute cost enough to make high-resolution generation practical, and nearly every production image model works this way.
What is the difference between diffusion and a GAN?
A GAN produces an image in one forward pass, fast but hard to steer. Diffusion refines over many steps, so you can intervene between them with guidance, masks and control inputs. That is why diffusion vs gan resolved in favour of diffusion for prompt-driven work, while GANs kept upscaling and restoration.
Does the scheduler matter?
Some. The scheduler decides how large each denoising step is and how randomness is reinjected. Swapping schedulers changes texture and convergence speed more than content, and one that suits a model at 20 steps may need different settings at 8.

Related terms