The first time someone explained diffusion models to me, they used the word “stochastic” three times in one sentence and I retained nothing. So let me try the opposite approach: no jargon without a translation, no math, just the actual ideas with concrete pictures. By the end you’ll understand what happens between typing a prompt and seeing an image — genuinely understand it, not just nod along. If the creative implications interest you more than the mechanics, can AI make art is the companion piece; this one is the engine room.
Table of Contents
- The 30-Second Version
- Step 1: Learning From Billions of Pictures
- Step 2: Your Prompt Becomes Numbers
- Step 3: Starting From Pure Noise
- Step 4: Denoising, One Step at a Time
- Why the Same Prompt Gives Different Images
- Where “Understanding” Comes From (and Its Limits)
- Diffusion vs. Older Approaches
- What the Model Can’t Do (Yet)
- Frequently Asked Questions

The 30-Second Version
An AI image generator is a system that learned, from billions of captioned images, how visual concepts relate to words — then uses that knowledge to build new images from scratch. You type a description; the system starts with random static (like TV snow) and gradually sculpts it into an image matching your words, guided by everything it learned during training. It’s not retrieving a picture or cutting up old ones — it’s constructing pixels, step by step, from noise. That construction process is called diffusion, and it’s the core idea this whole guide unpacks.
Step 1: Learning From Billions of Pictures
Before a model can generate anything, it trains. Training means showing it an enormous collection of images, each paired with a text description — “a red barn in a wheat field,” “portrait of a smiling elderly man,” and billions more. The landmark public datasets contain around 5 billion such pairs, scraped from across the web.
What does the model actually do with them? It plays a game, trillions of times: take an image, add noise until it’s unrecognizable static, then try to remove the noise and recover the original — using the caption as a hint about what should emerge. Each attempt, it gets a little better at denoising. The “knowledge” it accumulates lives in its parameters (billions of adjustable numbers): not stored images, but learned patterns — the visual signature of “barn,” the texture language of “impressionist,” the geometry of faces, the way light wraps around objects.
Two things worth noting. First, the model never sees your future prompts during training; it learns general visual-text relationships and applies them to descriptions it never encountered. That’s why it can draw “an astronaut riding a horse” despite no such photo existing in training. Second, training is enormously expensive — weeks on thousands of specialized chips — which is why only well-funded organizations train foundation models, while everyone else fine-tunes or uses them.
Step 2: Your Prompt Becomes Numbers
When you type “a lighthouse on a cliff at sunset,” the model can’t work with English directly — it needs numbers. A component called the text encoder converts your prompt into a numerical representation called an embedding: a long list of numbers capturing the meaning.
Think of the embedding as coordinates in a vast “meaning space.” In this space, “lighthouse” sits near “beacon” and “tower,” far from “toaster.” “Sunset” sits near “dusk” and “golden hour.” The geometry of this space captures semantic relationships — and crucially, it’s a shared space: images get embedded into the same space during training, so “lighthouse-ness” as a word and “lighthouse-ness” as pixels occupy nearby coordinates.
This shared space is the Rosetta Stone of the whole system. It lets the model translate between your words and visual content — not by dictionary lookup, but by proximity in meaning-space. When you write “cinematic lighting,” the embedding lands near all the dramatic-lighting imagery the model absorbed, and that neighborhood guides generation.
Practical consequence: prompt wording matters because embeddings are sensitive. “Beautiful” and “gorgeous” sit near each other but not identically; “photorealistic” pulls toward a different neighborhood than “oil painting.” Prompt engineering is, at bottom, navigation in meaning-space — learning which coordinates produce which visual neighborhoods.
Step 3: Starting From Pure Noise
Here’s the part that surprises people: generation begins with pure randomness. The model creates a field of random static — literal noise, like an untuned television — as its starting canvas. Nothing about your prompt is in it yet.
Why start from noise? Because the model’s entire training was “turn noise into images guided by captions.” Noise is its native starting material. And starting random is what makes generation generative: different noise, different image — the seed of variation that lets one prompt produce infinite images.
There’s a neat detail: the noise isn’t in pixel space but in a compressed representation called latent space. Instead of denoising a full-resolution image (slow, expensive), the model works in a compact encoded version — roughly 48x smaller — and only decodes to full pixels at the very end. What Stable Diffusion is gets its name from this: diffusion happening in latent space. The compression is why generation takes seconds instead of hours.

Step 4: Denoising, One Step at a Time
Now the magic: the model denoises the static in small steps — typically 20 to 50 of them — each step removing a little noise and adding a little structure, guided by your prompt’s embedding.
Early steps decide the big things: composition, layout, where the lighthouse goes, where the horizon sits. Middle steps resolve forms: the tower’s shape, the cliff’s mass, the sun’s position. Late steps refine details: texture on the rocks, light on the water, subtle gradients in the sky. It’s like watching a sculptor work from rough blocking to fine carving, except it happens in seconds.
At each step, the model asks: “given this noisy image and this caption, what should be slightly less noisy?” Its training taught it to answer that question well. The prompt embedding acts as a constant steering signal — every denoising step is biased toward images that would match your description.
The number of steps is a quality dial: more steps, finer refinement, slower generation. (This is related to what Midjourney’s --quality parameter adjusts — more compute per image. How Midjourney works covers the product-level view.)
When denoising finishes, a decoder expands the latent representation into a full-resolution image. Done: prompt in, picture out, thirty seconds, no pixels harmed.
Why the Same Prompt Gives Different Images
Type the same prompt twice, get two different images. Three reasons:
- Different starting noise. Unless you fix the seed, each generation starts from different random static. Different starting points unfold into different images — same prompt, different dice roll.
- The process is probabilistic. Denoising involves sampling, not just calculation — at each step the model picks among plausible options. Run the same noise twice and you’d still get slight variations (in practice, seeds fix this too).
- The prompt underdetermines the image. “A lighthouse at sunset” is compatible with millions of images. The model must fill in everything you didn’t specify — and it fills differently each time. Your words are a destination; the route varies.
This is a feature, not a bug. The underdetermination is what makes the tool a creativity partner rather than a vending machine: it contributes its own “choices” within your constraints. Fixing the seed removes reason 1 (and mostly 2), which is why seeds give repeatable compositions — reason 3’s contribution then becomes stable too.
Where “Understanding” Comes From (and Its Limits)
The model behaves as if it understands — it knows lighthouses go on coasts, that sunsets are orange, that “melancholy” suggests muted tones. Where does this come from? From statistical correlation across billions of examples. It never learned what a lighthouse is; it learned what lighthouse-images look like and which words accompany them.
This produces genuine competence within distribution and revealing failures outside it:
- Hands. The classic failure — too many fingers, fused digits. Hands are complex, varied in pose, and often small in training images; the statistics are just noisier. (Improving steadily with newer models.)
- Text. Rendered words come out garbled because the model learned text as texture, not as symbols with meaning. It knows what writing looks like, not what it says.
- Counting and spatial relations. “Three apples to the left of two oranges” is hard — precise quantities and relations are weakly represented in the caption statistics.
- Physics and logic. Objects float, shadows disagree with light sources, reflections show impossible scenes. The model learned appearances, not physics.
The pattern: failures cluster where statistical appearance-learning diverges from real understanding. The model is a master of how things look, with no model of how things work. Knowing this boundary tells you what to trust (aesthetics, mood, style) and what to verify (details, text, counts, physics).
Diffusion vs. Older Approaches
Diffusion dominates today, but it’s worth knowing what came before — it explains why current tools feel so capable:
GANs (Generative Adversarial Networks, ~2014-2021). Two networks dueling: a generator making fakes, a discriminator spotting them. Produced the famous “this person does not exist” faces. Brilliant at narrow domains, but hard to train, prone to “mode collapse” (generating the same few outputs), and difficult to steer with text. Diffusion largely replaced GANs for text-to-image because it’s more stable and more controllable.
Autoregressive models. Generate images pixel-by-pixel or patch-by-patch, like language models generate word-by-word. Conceptually clean, but slow and lower-quality for images. (DALL-E 1 used a variant of this approach.)
Why diffusion won: better training stability than GANs, natural fit for iterative refinement, and — decisively — excellent compatibility with text guidance. The denoising framework turned out to be the right substrate for “steer image formation with words.” The field converged fast once that became clear.
What the Model Can’t Do (Yet)
Honest boundaries, as of now:
- True invention from nothing. Outputs recombine training patterns; genuinely unprecedented visual concepts (a new art movement, say) don’t emerge unprompted.
- Reliable precision. Text, counts, exact layouts, consistent characters across images without special tooling — precision tasks fight the probabilistic grain.
- Understanding your intent beyond words. The model reads your prompt, not your mind. Underspecification is filled statistically, not empathetically.
- Copyright-clean generation. It learned from copyrighted works; the legal status of training and outputs is contested territory.
- Self-correction. It can’t look at its output and notice the hand has six fingers — there’s no vision-to-judgment loop in basic generation. (Multimodal systems are starting to add this.)
None of these are permanent — each is an active research frontier. But they’re the honest edges of the current technology, and knowing them makes you a better user: you’ll stop fighting the tool’s nature and start working with its grain.

Frequently Asked Questions
AI image generators use diffusion models trained on billions of captioned images. Your text prompt is converted to numbers (an embedding), the model starts from random noise, and it gradually denoises that noise into an image matching your description over 20-50 steps.
A diffusion model learns by practicing: take an image, add noise until it’s static, then learn to reverse the process. Once trained, it can start from pure noise and “denoise” its way to a new image guided by a text prompt — like a sculptor revealing form from a block of static.
No — they construct new images from random noise using learned visual patterns, not by retrieving or cutting up training images. Rare “memorization” cases can reproduce training images, but normal generation synthesizes genuinely new pixels.
Each generation starts from different random noise, the denoising process involves probabilistic sampling, and prompts underdetermine images — “a lighthouse at sunset” fits millions of valid images. Fixing the seed makes results repeatable.
Hands are complex and varied in training data, so the learned statistics are noisy. Text is learned as visual texture rather than meaningful symbols — the model knows what writing looks like, not what it says. Both are improving with newer models.




