From words to numbers
An image model cannot read. The first step turns your prompt into a list of numbers that stands for its meaning. In the models that made this approach common, that job is done by a text encoder trained on hundreds of millions of image and caption pairs, so that words and pictures land near each other in the same space (Radford et al., 2021). Two prompts that mean similar things end up as similar numbers, which is why rephrasing often changes less than you expect, and why a word the encoder never learned has little effect.
Starting from noise
Diffusion models, the family behind Stable Diffusion, Flux and many commercial tools, learn by watching images dissolve. During training, real pictures are buried step by step under random noise, and the model learns to undo one step at a time (Ho et al., 2020). To make a new picture, it starts from pure noise and removes it in a series of steps, each time guided by the numbers from your prompt.
The noise is the reason two runs never match. Change the starting noise and you change the picture, which is what a seed controls in tools that expose one: the same seed, prompt and settings give the same image, as the Diffusers library documents for its generator setting (Hugging Face Diffusers docs). Most of the work happens in a compressed version of the image rather than on every pixel, which made these models far cheaper to train and run (Rombach et al., 2022).
Guidance, and why prompts matter
At each step the model makes two predictions, one that follows the prompt and one that ignores it, and leans the result towards the first. How hard it leans is the guidance scale (Ho and Salimans, 2022). In Diffusers it defaults to 7.5; higher values follow the prompt more closely at some cost to image quality. A negative prompt works through the same mechanism, by replacing the "ignore the prompt" prediction with one for the things you want to avoid.
Chat models that draw
ChatGPT and Gemini put a language model in front of the image step. It reads your message in full sentences, keeps track of the conversation, and can rewrite the request before any picture is made, which is why plain sentences work well there and lists of tags do not; see our ChatGPT and Gemini prompt guide. The vendors publish less about the image step itself, so we describe what we can observe: neither gave us a seed, and the same request never drew the same picture twice.
Where traces enter the file
Nothing in the maths above writes a label. Labels are added around it, at three points. An invisible watermark can be woven into the pixels as the image is made; Google says SynthID is added the moment content is created (Google DeepMind, SynthID). A signed content credential is attached when the service packages the file. And some open-model tools write the prompt and settings into the file as text. Each one is a choice by the company or tool, not a property of diffusion, which is why files from different generators carry such different records.
Our four layers page shows what three real files held, and open-weight models covers what you get when you run a model yourself.
- "The model copies images"
It learns patterns from training images and builds new ones from noise; repeated details, like the boat names above, show what it saw most often.
- "Style words are magic"
They are shortcuts to what the model has seen; our art styles test shows what each one drags in.
- "A seed travels"
A seed only repeats a result with the same model version and settings.
- "Longer prompts are better"
Past a point, extra words compete for the same guidance and blur what matters.