Module 6 · Beyond text: images, voice and video · Lesson 25 of 32
How AI makes images
10 minFree GenAI course · BeginnerLesson 6.1By Saket Bhatnagar
Researched and drafted with AI, reviewed and edited by Saket Bhatnagar.
In short
- Most AI image tools start from pure random noise, like TV static, not from a blank page or a copied photo.
- A trained model removes a little noise at a time, steered by your words, until a picture appears. This is called diffusion.
- It learned by watching millions of captioned pictures get noisy, and practising how to clean them up.
Video lesson · coming soon
How AI makes images: diffusion in 3 minutes
Lala, your AI mentor, will walk you through this lesson in a short animated video. Until then, everything is here to read and try.
- 01 A chai picture from pure static
- 02 Ten steps from noise to chai
- 03 A restorer with no photo underneath
- 04 Learning by adding noise
- 05 Your words steer every step
- 06 Check the details
- 07 Play the slider, then hear voice AI
Priya types “a glass of cutting chai on a rainy Mumbai window ledge, steam rising” into an image tool. A few seconds later, there it is: the chipped glass, the grey sky, drops on the window. That exact picture never existed before.
It was not copied from the internet. It was not painted stroke by stroke from the top-left corner either. It began as fuzzy static, the kind an old TV showed when the antenna slipped. This lesson shows how static turns into chai.
Every picture starts as static
At each step, the model looks at the noisy image and asks one question: “Which part of this looks like noise that should not be here?” It removes some of that noise. Then it looks again. Shapes appear first, then colours, then fine details.
Did you notice? At step 0 it is pure noise. Around the middle, a rough cup shape appears, though you could not swear it was chai. Steam lines show up around step 7, and by step 10 it is a clear pixel cup of chai on a saucer. Real tools work the same way, with far more pixels and usually more steps.
Classic diffusion models use roughly 20 to 50 steps. Newer fast models, trained to take bigger strides, can produce a good image in a handful of steps, sometimes fewer than ten. More steps usually means more detail, and more waiting.
How does the model learn to clean up noise?
Here is the clever trick. Making noise takes a computer no effort at all. So during training, we take a real photo with its caption, say “a cat on a scooter”, and add a little noise. Then a bit more. Then more, until it is pure static.
At every level of noise, the model is shown the noisy picture and the caption and must guess the noise that was added. We know the right answer, because we added it. So we can check the guess and nudge the model, the same guess, check, nudge loop you met in module 1.
How a diffusion model is trained
Drag to exploreA real captioned photo is made noisy on purpose. The model guesses the noise, the guess is compared with the true noise, and the model is nudged. Repeat for millions of pictures.
Diagram connections:
- Captioned photo to Add some noise (mix in static)
- Add some noise to Model guesses noise (noisy photo)
- Model guesses noise to Compare with truth (its guess)
- Compare with truth to Nudge the model (error)
- Nudge the model to Model guesses noise (better next time)
- Captioned photo: For example, a photo labelled “a cat on a scooter”.
- Add some noise: Random static is mixed in, a little or a lot.
- Model guesses noise: Sees the noisy photo and the caption, predicts the added no…
- Compare with truth: We know the real noise, so we can measure the error.
- Nudge the model: Its settings shift slightly to be less wrong next time.
After seeing hundreds of millions of picture and caption pairs, the model has learned what noise looks like on top of cats, chai, cricket grounds and Kathakali dancers. Then, when we give it pure noise and a caption, it “cleans” its way to a picture that fits the words.
How do your words steer the picture?
Your prompt is first turned into embeddings, the lists of numbers that capture meaning, from the embeddings lesson. These numbers are fed into every denoising step. So at each step, the model removes noise in a way that moves the picture closer to “chai, rainy window, steam”.
Cleaning millions of pixels many times is slow. So most modern tools do the denoising on a compact sketch of the image, in latent space. A separate part, the decoder, then paints that sketch out into a full-size picture at the end.
From your prompt to a picture
Drag to exploreYour words become embeddings. The denoiser starts from random noise and cleans it step by step, guided by those embeddings. The decoder turns the result into the final image.
Diagram connections:
- Your prompt to Text to embeddings (words)
- Text to embeddings to Denoise, many steps (guides)
- Random noise to Denoise, many steps (starts from)
- Denoise, many steps to Decoder (clean sketch)
- Decoder to Your image (pixels)
- Your prompt: “Cutting chai on a rainy window ledge, steam rising.”
- Text to embeddings: Turns your words into numbers that carry meaning.
- Random noise: A fresh patch of static, picked using a seed number.
- Denoise, many steps: Removes a little noise each step, steered by the prompt.
- Decoder: Expands the compact result into full-size pixels.
- Your image: A new picture that fits the description.
This explains something you may have seen. Type the same prompt twice and you get two different pictures. The words were the same, but the starting static was different. Many tools also have a guidance setting: higher means “follow my words more strictly”, lower gives the model more freedom.
| Part | What it controls | Example |
|---|---|---|
| Subject | What is in the picture | A glass of cutting chai and two biscuits |
| Setting | Where and when | On a window ledge in Mumbai, monsoon evening |
| Style | How it looks | Watercolour illustration, soft edges |
| Light and mood | The feeling | Warm lamp light, cosy, a little misty |
| Framing | Where the camera is | Close-up, from the side, background blurred |
Video, mistakes and honest limits
AI video tools stretch the same idea across time. Instead of cleaning one picture, they clean a whole short clip of frames together, so the cup stays the same cup as the steam moves. That is much heavier work, which is why video takes longer and costs more.
- Exact details can still slip: a long line of small text, the right number of objects, or “the red cup to the left of the blue one”. Models have improved a lot here, but check before you use the image.
- Pictures reflect their training data. Ask for “a doctor” or “a CEO” and you may get the same kind of face again and again. Be specific about who you want to see.
- Who owns the training pictures, and the style of living artists, is still argued in courts and parliaments in 2026. Rules differ by country and change often.
- Fake photos of real people can cause real harm. Many tools refuse them, and some add invisible watermarks or “content credentials” that show a picture was made by AI.
Check yourself
Check yourself
What does a diffusion image model start from when you type a prompt?
Pick an answer to see why it is right or wrong.
Check yourself
During training, how does the model learn to remove noise?
Pick an answer to see why it is right or wrong.
Check yourself
Riya types the same prompt twice and gets two different pictures. Why?
Pick an answer to see why it is right or wrong.
Remember these three
- Diffusion models start from random noise and remove a little at a time, steered by your words, until a picture appears.
- They learn by guessing noise added to millions of captioned pictures, then using that skill on pure static.
- Your prompt becomes embeddings that guide every step; the seed decides the starting noise.
Questions people ask
- How does AI image generation work in simple words?
- Most AI image tools start with random static and remove a little of it at a time, guided by your text, until a picture appears. They learned this by practising on millions of captioned images that were made noisy on purpose.
- What is a diffusion model?
- A diffusion model is a type of AI that creates images, and sometimes video or audio, by turning noise into something clear in many small steps. The name comes from the training, where pictures are slowly spread out into noise and the model learns to reverse it.
- Does AI copy images from the internet?
- It does not paste or stitch stored photos. It generates new pixels from noise using patterns learned in training. However, it can sometimes produce things very close to famous images or styles it saw often, which is part of the copyright debate.
- Why does AI sometimes get text and hands wrong in images?
- The model learns what looks likely, not exact rules like spelling or how many fingers a hand has. Newer models are much better at both, but small text and exact counts can still go wrong, so check before using an image.