The main idea: the picture emerges from noise
Intuition suggests that AI draws a picture like an artist: line by line, object by object. That is wrong.
In fact the model works the other way round. It starts with a frame of pure random noise, like the static on an old TV, and gradually removes what is unnecessary until a meaningful image appears.
The closest real-world analogy is developing photographic film. You put the sheet into developer: first it is murky, then outlines appear, then details, and at the end a finished photograph. The model does the same thing, only with mathematics instead of chemistry, and it can point its «developer» at any image you describe in words.
This process is called diffusion, and it was inspired by physics: by how a drop of ink spreads in water. The model was taught to run that spreading in reverse, gathering the drop back together.
How it was taught
For the model to be able to remove noise, it was first taught to add it.
You take a huge set of real pictures. Noise is mixed into each one step by step: a little, then more, then more again, until nothing but static is left of the image. At each step the model remembers what the frame looked like before and after the noise was added.
Having repeated this on hundreds of millions of images, the model learns the reverse operation: given a noisy frame, predict what it looked like slightly cleaner. And if it can do one step of cleanup, then by repeating it many times it can go all the way from pure noise to a finished picture.
The key point: the model does not memorise pictures. It memorises patterns, how images are usually structured. That is why it can create things that were not in its training: it has never seen a cat in a spacesuit, but it has seen both cats and spacesuits and knows what each looks like.
Where your text comes in
So far we have described how the model makes some picture out of noise. But you need a specific one. This is where the prompt comes in.
Your text is first turned into numbers. This is done by a separate component, the text encoder, trained to link words with images. It has seen millions of «picture and its caption» pairs, so it knows that the word «sunset» corresponds to certain colours and shapes.
These numbers become a hint at every cleanup step. Roughly speaking, at each step the model asks itself: «in which direction should I remove noise so the result looks more like what the text describes?»
This leads to an important practical conclusion: the model understands meaning rather than looking for exact words. It does not matter whether you wrote «car» or «automobile». What matters is the concept. So a detailed, meaningful description works better than a list of keywords.
Why one description gives different pictures
You have surely noticed: you press generate twice with the same prompt and get two different images.
The reason is the starting noise. Each generation starts from its own random frame of static. Different noise at the input leads to a different picture at the output, even if the text is the same.
This is controlled by the seed parameter, the number from which the starting noise is generated. The same seed plus the same prompt give an identical result. Change the seed and you get a variation. This is exactly how professionals lock in a good shot or create a series of similar ones: they play with the seed while keeping the prompt unchanged.
Latent space: why it is fast
A full-size picture is millions of pixels. Running noise through all of them at each of dozens of steps would be monstrously expensive.
So modern models work not with pixels but with a compressed representation of the image, called latent space. It is like working with a sketch instead of a detailed painting: the essence is kept, but there are many times fewer details, so computing is faster.
The whole diffusion process takes place in this compressed form. Only at the very end, when the picture has «developed», does a separate component expand it back into a full-size image with all its pixels.
That is why generation takes seconds, not hours. And that is why there are different resolutions: it can be expanded to different sizes, and the bigger, the more expensive.
Now it is clear why the model mixes up fingers
The famous bad hands problem is explained precisely by how diffusion works.
The model does not know a human has five fingers. It has no concept of anatomy, a skeleton or a three-dimensional body. It has seen millions of flat pictures and remembered statistical patterns: how pixels usually look next to other pixels.
With hands these patterns are especially treacherous:
- Fingers look alike. The model sees a group of elongated pink shapes and adds one more «just in case».
- Fingers overlap each other. In a photo some fingers are hidden behind others. Reconstructing them, the model may «draw in» extra ones.
- A hand takes thousands of shapes. A face is almost always frontal and symmetrical, while a hand can be in any position. The variety throws off the statistics.
- The model assembles the picture in parts and does not keep an overall count. It may add a finger on one side, forgetting how many there already are on the other.
The good news: new models do noticeably better than old ones. The more detailed the model and the more high-quality images of hands it was trained on, the less often it makes mistakes. But the problem has not gone away completely and is unlikely to while models remain statistical rather than understanding anatomy.
A detailed breakdown of artefacts and how to fix them is in a separate article: why AI draws bad hands.
Why the model loves averaged beauty
Another consequence of the mechanics. The model is trained to predict the most likely result. And the most likely is the average across the training data.
So without a specific prompt it pulls towards a generically pretty picture: symmetrical faces, smooth skin, pleasant light. Not because it has taste, but because there were the most images like that in training.
Hence a practical conclusion that links theory with practice: to get something specific rather than average, you need to pull the model away from the median with a precise description. That is exactly what the article on how to write prompts is about.
In short
AI does not draw a picture; it develops it out of random noise, removing what is unnecessary step by step. The prompt text steers this cleanup. All of this happens in a compressed latent space for speed, and at the end it is expanded into a full-size image.
Everything else follows from these mechanics: different pictures from one prompt (different starting noise), bad fingers (no understanding of anatomy), a love of averaged beauty (the model predicts the most likely outcome). Understand the mechanics and you understand how to talk to the model.