{"course":{"slug":"ai-actually-explained","title":"AI, Actually Explained","url":"https://addaly.com/learn/ai-actually-explained","level":"beginner","track":"start"},"lesson":{"slug":"a-picture-from-noise","title":"A picture, out of noise","url":"https://addaly.com/learn/ai-actually-explained/a-picture-from-noise","position":53,"of":92,"minutes":9,"answer":"An image model is trained to remove a little noise from a picture, and generating an image is running that skill backwards from pure static, step by step, until a picture appears.","keyIdea":"An image model is trained to remove a little noise from a picture, and generating an image is running that skill backwards from pure static, step by step, until a picture appears."},"body":{"format":"markdown","text":"## Not the same trick as the chatbot\n\nA chatbot writes one token at a time, left to right. That does not work for a picture. A photograph has no first pixel, and a face drawn one pixel at a time would have no way of knowing, when it reached the second eye, what the first one looked like. Image models needed a different idea, and the one that won in 2022 is odd enough to be worth understanding properly.\n\n## Learn to clean, then run it backwards\n\nTake a photograph. Add a little random static to it. Add a little more. Keep going for a thousand steps and you have pure noise: every trace of the picture is gone. That part is trivial. Anyone can ruin a photograph.\n\nNow train a network on the reverse: show it a slightly noisy picture and ask it to predict the noise that was added, so the noise can be subtracted. Show it millions of pictures at every level of noisiness. What it learns is not any particular picture but what *pictures in general* look like, well enough to say which parts of a smudge are static and which parts are the beginnings of an edge.\n\nGeneration is that skill run from the wrong end. Start with a canvas of pure random noise. Ask the network what noise to remove. Remove a little. Ask again. After twenty to fifty rounds, what is left is a picture that was never in the training set, assembled by a machine that only ever learned to clean. The technical name is diffusion, after the physics of ink spreading in water, and the design dates from a 2015 paper that almost nobody read and a 2020 paper that everybody did.\n\n> Figure: Learn to clean a picture, then run it backwards. Steps: 1. Train on ruined photographs (Add static to millions of pictures at every level, and ask the network to predict the noise so it can be subtracted); 2. Start from pure static (A canvas of random numbers, compressed to a small grid rather than full pixels); 3. Remove a little, guided by the prompt (The text is handed in at every step and steers which interpretation of the smudge is sharpened); 4. Repeat twenty to fifty times (Each round commits harder to the structure the last one found); 5. Decode back to pixels (A picture that was never in the training set, assembled by a machine that only learned to clean). The network only ever learned to remove noise. Shown pure static it finds the most picture-like interpretation of the smudge and commits, and every later step sharpens whatever it committed to. Doing the work on a 64-by-64 grid rather than 512 pixels is why an image costs a fraction of a cent.\n\n## Why it works at all\n\nThe first time most people hear this they ask the right question: where does the picture come from, if you started from static? The answer is that the network was trained on pictures with *some* real structure under the noise, and it has no way to tell whether the structure it thinks it sees is real. Shown pure static, it does what it always does (finds the most picture-like interpretation of the smudge) and commits to it. Every subsequent step sharpens whatever it committed to. The image is a hallucination in the most literal sense, and this time that is the point.\n\n## The trick that made it cheap\n\nThe version that reached the public in August 2022, which you can still download and run for nothing, added one thing. Working on every pixel of a large image is slow. So the picture is first compressed by a separate network into a much smaller grid (a 512-pixel square becomes a 64-by-64 grid of numbers that describe its content) and the noise-removal happens on that. At the end a decoder turns the small grid back into pixels. Denoising sixty-four squared is sixty-four times less work than five hundred and twelve squared. That is why it ran on a gaming card in a bedroom, and why a photograph-quality image now costs a fraction of a cent.\n\n## How words come in\n\nThe description above draws a random picture. To draw *your* picture, the noise-removal network is given the text as well, at every step, and steers toward an interpretation of the static that matches it. How the text is turned into something the network can use, and why the prompt works the way it does, is the next lesson.\n\n## Where to try it\n\nThe paid tools named in job advertisements are Midjourney, Adobe's Firefly (built into Photoshop), and the image mode inside the big chatbots. Every one of them is a diffusion model of this shape.\n\nThe free path is the same mechanism in your own hands. Stable Diffusion in its several versions and Flux from a German lab are open-weights image models. Fooocus runs them behind a one-box interface; ComfyUI exposes every step as a node you can rewire; the Krita image editor has a free plugin that paints with them inside the canvas. The smaller models run on a graphics card with four gigabytes of memory, or on a laptop without one at a couple of minutes per image, or free on a hosted notebook.\n\n## What the mechanism cannot do\n\nIt has no idea what it drew. The network never represents \"a cat\" as an object; it represents what cat-like regions of a noisy grid tend to resolve to. That is why it cannot count (three cats is a texture of catness, not three things) and why asking it to change one detail in a finished image tends to change everything, because there is no \"detail\" in there to hold still. Editing tools work around this by masking a region and re-running the process on that region alone. The workaround is good. The limit underneath it is the mechanism."},"check":{"question":"An image model produces a convincing photograph from a canvas of pure random noise. Where does the picture come from?","options":[{"text":"The model retrieves the closest matching photograph from its training set and blends it with the noise until the seams disappear.","correct":false,"tempting":"Imagines a lookup; the network holds no pictures, only the learned habit of finding structure in noise."},{"text":"It was trained to remove noise from real pictures, so shown pure static it commits to a picture-like reading and sharpens it.","correct":true},{"text":"The prompt is drawn first as an outline, and the noise is only added afterwards for texture.","correct":false,"tempting":"Reverses the process; the noise is the starting point and the picture emerges from cleaning it."},{"text":"The model understands the objects in the prompt and places each one on the canvas.","correct":false,"tempting":"Attributes objects to a system that never represents any; it is why it cannot count what it draws."}]},"prev":{"slug":"open-weights-and-closed","title":"Open weights, closed weights, and what \"open\" is hiding","url":"https://addaly.com/learn/ai-actually-explained/open-weights-and-closed"},"next":{"slug":"how-the-prompt-reaches-the-picture","title":"How words steer the picture","url":"https://addaly.com/learn/ai-actually-explained/how-the-prompt-reaches-the-picture"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'A picture, out of noise', in AI, Actually Explained. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/ai-actually-explained/a-picture-from-noise (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"A picture, out of noise","courseTitle":"AI, Actually Explained","module":{"index":6,"slug":"beyond-text","title":"Beyond text: pictures, voices and video"},"answer":null,"keyIdea":"An image model is trained to remove a little noise from a picture, and generating an image is running that skill backwards from pure static, step by step, until a picture appears.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure 6.1","figure":{"type":"flow","steps":[{"label":"Train on ruined photographs","detail":"Add static to millions of pictures at every level, and ask the network to predict the noise so it can be subtracted"},{"label":"Start from pure static","detail":"A canvas of random numbers, compressed to a small grid rather than full pixels"},{"label":"Remove a little, guided by the prompt","detail":"The text is handed in at every step and steers which interpretation of the smudge is sharpened"},{"label":"Repeat twenty to fifty times","detail":"Each round commits harder to the structure the last one found"},{"label":"Decode back to pixels","detail":"A picture that was never in the training set, assembled by a machine that only learned to clean"}],"title":"Learn to clean a picture, then run it backwards","caption":"The network only ever learned to remove noise. Shown pure static it finds the most picture-like interpretation of the smudge and commits, and every later step sharpens whatever it committed to. Doing the work on a 64-by-64 grid rather than 512 pixels is why an image costs a fraction of a cent."},"alt":"Figure: Learn to clean a picture, then run it backwards. Steps: 1. Train on ruined photographs (Add static to millions of pictures at every level, and ask the network to predict the noise so it can be subtracted); 2. Start from pure static (A canvas of random numbers, compressed to a small grid rather than full pixels); 3. Remove a little, guided by the prompt (The text is handed in at every step and steers which interpretation of the smudge is sharpened); 4. Repeat twenty to fifty times (Each round commits harder to the structure the last one found); 5. Decode back to pixels (A picture that was never in the training set, assembled by a machine that only learned to clean). The network only ever learned to remove noise. Shown pure static it finds the most picture-like interpretation of the smudge and commits, and every later step sharpens whatever it committed to. Doing the work on a 64-by-64 grid rather than 512 pixels is why an image costs a fraction of a cent."}},"blocks":[{"t":"h2","id":"not-the-same-trick-as-the-chatbot","runs":[{"text":"Not the same trick as the chatbot"}]},{"t":"p","runs":[{"text":"A chatbot writes one token at a time, left to right. That does not work for a picture. A photograph has no first pixel, and a face drawn one pixel at a time would have no way of knowing, when it reached the second eye, what the first one looked like. Image models needed a different idea, and the one that won in 2022 is odd enough to be worth understanding properly."}]},{"t":"h2","id":"learn-to-clean-then-run-it-backwards","runs":[{"text":"Learn to clean, then run it backwards"}]},{"t":"p","runs":[{"text":"Take a photograph. Add a little random static to it. Add a little more. Keep going for a thousand steps and you have pure noise: every trace of the picture is gone. That part is trivial. Anyone can ruin a photograph."}]},{"t":"p","runs":[{"text":"Now train a network on the reverse: show it a slightly noisy picture and ask it to predict the noise that was added, so the noise can be subtracted. Show it millions of pictures at every level of noisiness. What it learns is not any particular picture but what "},{"text":"pictures in general","i":true},{"text":" look like, well enough to say which parts of a smudge are static and which parts are the beginnings of an edge."}]},{"t":"p","runs":[{"text":"Generation is that skill run from the wrong end. Start with a canvas of pure random noise. Ask the network what noise to remove. Remove a little. Ask again. After twenty to fifty rounds, what is left is a picture that was never in the training set, assembled by a machine that only ever learned to clean. The technical name is diffusion, after the physics of ink spreading in water, and the design dates from a 2015 paper that almost nobody read and a 2020 paper that everybody did."}]},{"t":"h2","id":"why-it-works-at-all","runs":[{"text":"Why it works at all"}]},{"t":"p","runs":[{"text":"The first time most people hear this they ask the right question: where does the picture come from, if you started from static? The answer is that the network was trained on pictures with "},{"text":"some","i":true},{"text":" real structure under the noise, and it has no way to tell whether the structure it thinks it sees is real. Shown pure static, it does what it always does (finds the most picture-like interpretation of the smudge) and commits to it. Every subsequent step sharpens whatever it committed to. The image is a hallucination in the most literal sense, and this time that is the point."}]},{"t":"h2","id":"the-trick-that-made-it-cheap","runs":[{"text":"The trick that made it cheap"}]},{"t":"p","runs":[{"text":"The version that reached the public in August 2022, which you can still download and run for nothing, added one thing. Working on every pixel of a large image is slow. So the picture is first compressed by a separate network into a much smaller grid (a 512-pixel square becomes a 64-by-64 grid of numbers that describe its content) and the noise-removal happens on that. At the end a decoder turns the small grid back into pixels. Denoising sixty-four squared is sixty-four times less work than five hundred and twelve squared. That is why it ran on a gaming card in a bedroom, and why a photograph-quality image now costs a fraction of a cent."}]},{"t":"h2","id":"how-words-come-in","runs":[{"text":"How words come in"}]},{"t":"p","runs":[{"text":"The description above draws a random picture. To draw "},{"text":"your","i":true},{"text":" picture, the noise-removal network is given the text as well, at every step, and steers toward an interpretation of the static that matches it. How the text is turned into something the network can use, and why the prompt works the way it does, is the next lesson."}]},{"t":"h2","id":"where-to-try-it","runs":[{"text":"Where to try it"}]},{"t":"p","runs":[{"text":"The paid tools named in job advertisements are Midjourney, Adobe’s Firefly (built into Photoshop), and the image mode inside the big chatbots. Every one of them is a diffusion model of this shape."}]},{"t":"p","runs":[{"text":"The free path is the same mechanism in your own hands. Stable Diffusion in its several versions and Flux from a German lab are open-weights image models. Fooocus runs them behind a one-box interface; ComfyUI exposes every step as a node you can rewire; the Krita image editor has a free plugin that paints with them inside the canvas. The smaller models run on a graphics card with four gigabytes of memory, or on a laptop without one at a couple of minutes per image, or free on a hosted notebook."}]},{"t":"h2","id":"what-the-mechanism-cannot-do","runs":[{"text":"What the mechanism cannot do"}]},{"t":"p","runs":[{"text":"It has no idea what it drew. The network never represents “a cat” as an object; it represents what cat-like regions of a noisy grid tend to resolve to. That is why it cannot count (three cats is a texture of catness, not three things) and why asking it to change one detail in a finished image tends to change everything, because there is no “detail” in there to hold still. Editing tools work around this by masking a region and re-running the process on that region alone. The workaround is good. The limit underneath it is the mechanism."}]}],"check":{"question":[{"text":"An image model produces a convincing photograph from a canvas of pure random noise. Where does the picture come from?"}],"options":[{"text":[{"text":"The model retrieves the closest matching photograph from its training set and blends it with the noise until the seams disappear."}],"correct":false,"tempting":[{"text":"Imagines a lookup; the network holds no pictures, only the learned habit of finding structure in noise."}]},{"text":[{"text":"It was trained to remove noise from real pictures, so shown pure static it commits to a picture-like reading and sharpens it."}],"correct":true,"tempting":null},{"text":[{"text":"The prompt is drawn first as an outline, and the noise is only added afterwards for texture."}],"correct":false,"tempting":[{"text":"Reverses the process; the noise is the starting point and the picture emerges from cleaning it."}]},{"text":[{"text":"The model understands the objects in the prompt and places each one on the canvas."}],"correct":false,"tempting":[{"text":"Attributes objects to a system that never represents any; it is why it cannot count what it draws."}]}],"order":[0,1,3,2],"why":null},"prev":{"slug":"open-weights-and-closed","title":"Open weights, closed weights, and what “open” is hiding","minutes":9},"next":{"slug":"how-the-prompt-reaches-the-picture","title":"How words steer the picture","minutes":9}}}