Making Things with AILesson 1 of 84

Contents

Making Things with AI

Lesson 1 of 84. Sign in to keep your place.

Module 1 · How the picture gets made

What the model is actually doing

7 min read

One image, from a seed to a fileSeedA number youcan writedown. Itfixes everyvalue in thestartingstatic, andit is whatdecides thecomposition.Text encoderYour promptbecomes asequence ofvectors. Thedenoiserlooks at thatsequence atevery stepand at everyposition inthe grid.Denoise,twenty tofifty timesPredict thenoise in thecurrentlatent,subtract afraction,move down theschedule.Compositionsettles inthe first fewsteps.Guidance,twice perstepThe modelruns oncewith yourprompt andonce withnothing, andthe resulttravels pastthedifference.This is whygenerationcosts twoforwardpasses.DecoderThe 128 by128 latentgrid isexpanded backinto a 1024by 1024picture.Anything toosmall to beheld in thelatentreturns as asmear.PNG on diskMost localtools writethe wholerecipe into atext chunk inthe file.Export toJPEG and therecord isgone.Nothing here is a plan or a canvas. That is why changing one word can move the whole layout, and whyrerolling the seed is often the fix rather than another adjective.
Nothing here is a plan or a canvas. That is why changing one word can move the whole layout, and why rerolling the seed is often the fix rather than another adjective.

Figure 1.1

Start with a photograph you ruin

Take a photo. Add a little random speckle. Add a little more. Keep going for a thousand rounds and you have television static: the photo is gone. That process is easy and needs no intelligence at all.

Here is the trick the whole field is built on: that ruining is reversible, if you can predict, for a slightly noisy image, exactly which speckle was added.

What training actually does

Training a diffusion model is boring in a good way. Take an image from the training set. Pick a random amount of noise. Add it. Show the model the noisy image and tell it how much noise is in there. The model guesses what noise was added. Compare with the real answer, nudge the weights, repeat a few hundred million times.

That is it. The model never learns “what a cat looks like” as a fact you could look up. It learns one narrow skill: given a mess, guess which part of it is mess.

Generating is that skill run backwards

Start with pure static: random numbers produced from a seed you can write down. Ask the model what noise it sees. Subtract a fraction of it. Ask again. After 20 to 50 rounds, static has become a picture, because at every step the model pushed the image slightly toward “looks like the training photos”.

Two things follow immediately.

  • The seed decides the starting static. The same seed with the same prompt gives you the same image every time. A different seed gives a different picture from identical words.
  • The model has no canvas, no layers, no plan. Composition settles in the first handful of steps and gets refined afterwards. That is why changing one word can move the whole layout.

Where your words come in

A text encoder turns your prompt into a list of numbers. Those numbers are fed into the denoiser at every step, so its guess becomes “what noise is here, given that this is supposed to be a wet street at night”.

Then a technique called classifier-free guidance sharpens it. The model runs twice per step (once with your prompt, once with nothing) and the difference between the two is amplified. How much you amplify is the guidance scale, usually somewhere around 3 to 8. Set it low and the image drifts off your prompt. Set it high and you get the burnt, over-saturated, over-contrasted look people recognise as “an AI image”. That look is not a style. It is a knob turned too far.

Doing it in a smaller room

Denoising a 1024x1024 image directly means handling over three million numbers on every step. So most models work in a compressed space. A separate autoencoder squashes the image roughly eight times in each direction: 1024x1024 becomes something like 128x128 with a few channels, about 48 times fewer numbers. All the denoising happens there, and a decoder expands the result back into pixels at the end.

That compression is why very fine detail comes back mushy: a face forty pixels tall, small lettering, thin wires. It was never represented finely enough to survive the round trip.

Not every model works this way

Newer image models swap the original network for a transformer, and swap noise prediction for flow matching, which learns a straighter path from noise to image and needs fewer steps. Some systems generate images the way a chat model generates text, one token at a time, which handles instructions and lettering better and behaves differently when you edit. The mental model above still gets you most of the way, but do not assume every tool has a seed field or a guidance slider.

Why bother knowing this

Because it changes what you do when something fails. If the model has no plan, then “be more specific” is often not the fix and rerolling the seed is. If detail was destroyed by compression, no number of adjectives recovers a tiny face, but regenerating that region larger will. Most prompt folklore is people mistaking mechanics for magic.

Check your understanding

You generate an image with a fixed seed and like everything except one background element. You change a single word in the prompt and generate again with the same seed. What should you expect?

Pick the one you would defend. Your answer stays private.

Next lesson · 9 minNoise, steps and the schedule

Stuck on something?Ask Yetunde, your AI tutor

How to cite: Addaly (2026) ‘What the model is actually doing’, in Making Things with AI. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/making-things-with-ai/what-the-model-is-doing (Accessed: 31 October 2026).