How AI image models turn a prompt into a picture (and why the picture carries traces)

By The NeutronField editorsPublished Updated

Run on Gemini API (gemini-3.1-flash-image) and OpenAI image API (gpt-image), 2026-11-02

Short answer

An image model turns your prompt into numbers, starts from random noise, and removes that noise step by step, steering each step towards the prompt. The noise is why the same words give a new picture each time, and guidance decides how closely it follows you. Watermarks and credentials are added around this process, not by it.

frame 19AA red rowing boat on a pebble beach facing a grey sea, one of three runs of the same prompt
▸ 19ANF 06

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.

Worked example

EXAMPLE 1

Same words, new noise

One prompt sent three times: twice to the same model, once to another. Nothing else changed.

Prompt · frames 19, 19A and 20A
A red rowing boat pulled up on a pebble beach under an overcast sky, photographed from a low angle.

Run on Gemini API, gemini-3.1-flash-image (Nano Banana 2) · 2026-11-02 (19, 19A); Run on OpenAI image API (gpt-image) · 2026-11-02 (20A)

frame 19Frame 19: a red rowing boat on a pebble beach with cliffs behind, the name SEAGULL KY 142 painted on its side
▸ 19NF 06
frame 19AFrame 19A: a red rowing boat on pebbles facing the sea, the name SEA LARK painted on its side
▸ 19ANF 06
frame 20AFrame 20A: a red rowing boat seen low from the bow on a pebble beach, a rope trailing from it
▸ 20ANF 06 · KEPT
Frames 19 and 19A: same model, same prompt, two runs. Frame 20A: the same prompt on another model.
Models
gemini-3.1-flash-image; gpt-image
Aspect
3:2
Seed
Not exposed
Changed
Nothing

Each run starts from different random noise, so the same words give a different boat, beach and sky every time. The Gemini runs also painted names on the boat that nobody asked for: a model fills every gap the prompt leaves with what it has seen most often. Frame 20A is kept for the low angle the prompt asked for.

Settings you can see

Diffusion settings as documented for Hugging Face Diffusers (accessed 2026-11-02). Chat apps hide most of them.
SettingWhat it doesDefault in Diffusers
StepsHow many denoising steps run; more usually means more detail and a slower result50
Guidance scaleHow strongly each step leans towards the prompt7.5
Negative promptWhat to steer away from, through the same guidance stepNone
Seed (generator)Fixes the starting noise so a run can be repeated exactlyRandom
Sampler (scheduler)The method used to take each denoising stepDepends on the model

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.

frame 20AFrame 20A, the kept frame: a red rowing boat seen low from the bow on a pebble beach
▸ 20ANF 06 · KEPT

What frame 20A carries

SignalYesNo
Content credentialmarkednot marked
Metadata fieldsnot markedmarked
Prompt saved in filenot markedmarked

Checked on 2026-11-02 with c2pa-rs (c2pa-python). Signed by OpenAI; the credential records a watermark step. Frames 19 and 19A carried Google's credential.

Sources

  1. Ho, Jain and Abbeel: Denoising Diffusion Probabilistic Models, arXiv 2006.11239, 2020arxiv.org
  2. Rombach et al.: High-Resolution Image Synthesis with Latent Diffusion Models, arXiv 2112.10752, 2021arxiv.org
  3. Radford et al.: Learning Transferable Visual Models From Natural Language Supervision (CLIP), arXiv 2103.00020, 2021arxiv.org
  4. Ho and Salimans: Classifier-Free Diffusion Guidance, arXiv 2207.12598, 2022arxiv.org
  5. Hugging Face Diffusers docs: Text-to-image pipeline (accessed 2026-11-02)huggingface.co
  6. Google DeepMind: SynthID (accessed 2026-11-02)deepmind.google

Questions

How do AI image generators work?

Most start from random noise and remove it in many small steps, each one guided by a numerical version of your prompt, until a picture is left. Chat tools like ChatGPT and Gemini add a language model that reads and may rewrite your request first.

What is a diffusion model?

A model trained to reverse the gradual noising of real images. To create a picture it runs that process backwards from pure noise, as described by Ho and colleagues in 2020.

Why do I get a different image with the same prompt?

Each run starts from different random noise. Tools that expose a seed let you fix that noise; with the same seed, prompt, model version and settings the result repeats.

What does guidance scale do?

It sets how strongly each step is pushed towards the prompt and away from an unprompted prediction. Diffusers uses 7.5 by default; higher values follow the prompt more closely at some cost to image quality.

Does the model add the watermark?

Not by itself. Watermarks, content credentials and saved prompts are added by the company or tool around the model, which is why different generators leave different records in their files.

Related reading