How does AI draw a picture from noise?
Diffusion (denoising image models) · Beginner · 5 min · training, sampling
A diffusion model draws by starting from random noise and removing a little predicted noise per step. It learns by adding noise to real pictures and guessing it back; the prompt steers which picture appears.
1 Guess first
2 Look
From noise to a picture
1 / 4step 0 · 100 % picture step 200 · 81 % picture step 500 · 28 % picture step 1000 · 0.6 % picture training: noise added over 1,000 steps · picture illustrative · mix and schedule: DDPM (Ho et al., 2020)
Training: take a picture and add noise, a little per step, until nothing of it is left.
Training adds noise to pictures until nothing is left; the model learns to guess that noise, and drawing runs the same thing backwards from pure noise, steered by the prompt.
In training the model sees pictures with every amount of noise and learns one skill: guessing the noise. Drawing is that skill run backwards. Stable Diffusion works on a small compressed version of the picture, a latent (a compact code for the image), and turns it into pixels at the end.
4 You are the model
You are the denoiser. Four times, pick the next, less noisy picture that fits the prompt “a sun over a field”.
prompt: “a sun over a field” · same starting noise every time
now: step 1000 options mixed with DDPM’s schedule from the same noise · pictures illustrative
You are the denoiser: pick the next, less noisy picture that fits the prompt.5 Check
The seed (the number that picks the starting noise) decides where a picture begins. Stability’s API calls it “the seed used as random noise for this generation”. Same prompt and seed, same picture; new seed, new picture. Not every image model publishes how it works, so we call a model diffusion only when its maker says so.
7 Say it back
8 Mission · 5 min
With Stability AI’s 25 free credits, call Stable Diffusion 3.5 Medium (3.5 credits a picture) three times with the same prompt: seed 42, seed 42 again, then seed 7. The two seed-42 pictures match; seed 7 starts from different noise and gives a different picture.
Three quick ones
Drawn at random from this lesson's pool; different next time.
Done?
Go deeper
Sources
- https://arxiv.org/abs/2006.11239 (Ho, Jain, Abbeel; v1 2020-06-19; checked 2026-10-21): forward process adds Gaussian noise over T = 1000 steps, β linear 1e-4 → 0.02; x_t = √ᾱ_t·x₀ + √(1−ᾱ_t)·ε; network trained to predict ε. The shares 81 %, 28 %, 0.6 % (steps 200, 500, 1000) are √ᾱ_t of that schedule (arithmetic)
- https://arxiv.org/abs/2112.10752 (Rombach et al.; v1 2021-12-20, v2 2022-04-13; checked 2026-10-21): diffusion “in the latent space of powerful pretrained autoencoders”; cross-attention layers for conditioning inputs such as text
- https://docs.stability.ai/api-reference/generate/stable-diffusion-35 (checked 2026-10-21): SD3.5 Large Turbo “a distilled version… in just 4 steps”; seed “The seed used as random noise for this generation”; cfg_scale “how strictly the diffusion process adheres to the prompt text”; SD 3.5 Medium 3.5 credits per generation; 1-megapixel output
- https://docs.stability.ai/pricing (checked 2026-10-21): “Get started with 25 free credits.”; 1 credit = $0.01
- https://huggingface.co/black-forest-labs/FLUX.1-schnell (checked 2026-10-21): “12 billion parameter rectified flow transformer”; “high-quality images in only 1 to 4 steps”
- The 16×16 pictures, the noise (seed 7) and the sun/house options are illustrative, mixed with DDPM’s schedule; the “guessed noise” frame is the exact noise, labelled as a perfect guess
Published Oct 21, 2026 · updated Oct 21, 2026