{"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":"A diffusion model learns to undo added noise; generation starts with noise and uses the learned denoising process to build an image. A convincing result still needs checks for counts.","keyIdea":"A diffusion model learns to undo added noise; generation starts with noise and uses the learned denoising process to build an image. A convincing result still needs checks for counts, details and possible reproduction of training material."},"body":{"format":"markdown","text":"## Not the same trick as the chatbot\n\nA chatbot commonly writes one token at a time. Images can also be generated sequentially: PixelRNN demonstrated pixel-by-pixel prediction with dependencies on earlier pixels. This lesson follows a different approach, diffusion, which became widely used for image generation in 2022. Rather than choosing an arbitrary first pixel, it begins with noise and repeatedly refines an image.\n\n## Learn to reverse added noise\n\nIn one illustrative forward-noising schedule, take a photograph and repeatedly add random noise over a thousand steps. At the end, the distribution is made close to pure noise. The exact schedule and endpoint depend on the method; a thousand is an example, not a requirement of every image generator.\n\nNow train a network on the reverse: show it a noisy picture and ask it to predict a useful denoising target, such as the noise that was added. Across many pictures and noise levels, it learns patterns that help turn noisy inputs into plausible images. This does not mean that memorising individual training pictures is impossible.\n\nGeneration starts with noise and applies that learned denoising skill repeatedly. After the chosen sampling steps, an image emerges; the number of steps depends on the model and sampler. The result can be new, but some diffusion models can reproduce training examples. The technical name comes from diffusion, and influential papers developed the approach in 2015 and 2020.\n\n> Figure: A diffusion example: training and guided generation. Steps: 1. Train on ruined photographs (Add noise at different levels and train a target such as predicting the added noise); 2. Start from pure static (Start sampling with random values in the representation used by this model); 3. Remove a little, guided by the prompt (Text conditioning influences the next denoising update; it need not just sharpen a fixed earlier choice); 4. Use an illustrative twenty to fifty sampling steps (The actual count and update rule depend on the model and sampler); 5. Decode back to pixels (Decode a candidate image; check requested details and possible reproduction of training examples). Training learns a denoising target across noise levels. Sampling then starts from noise and uses repeated guided steps, whose count depends on the model and sampler. A 64-by-64 latent grid for a 512-pixel-square example reduces spatial locations, but does not determine an image price. Some models can reproduce training images, so a new-looking result is not a novelty guarantee.\n\n## Why it works at all\n\nThe picture comes from a learned generative process. Training on many noise levels teaches the network patterns that guide reverse steps toward the training distribution. Starting from noise and sampling those steps can produce a plausible image. It is a helpful simplification to call this finding structure in static, but the model is not recovering a hidden original photograph, and each step need not merely sharpen a fixed earlier interpretation.\n\n## The trick that made it cheap\n\nStable Diffusion became publicly available in August 2022 using latent diffusion. An autoencoder maps a picture to a smaller representation: in a familiar 512-pixel-square setup, that representation has 64-by-64 spatial locations. Denoising happens there, and a decoder returns it to pixels. That grid has one sixty-fourth as many spatial locations; compute and memory savings also depend on channels, architecture and the sampling pipeline. Running the software still requires suitable hardware or a hosted service; no particular image price follows from the grid ratio.\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\nImage products include Midjourney, Adobe Firefly and image generation inside chatbots. Their capabilities and underlying designs vary by version. Diffusion is one important approach, not the architecture of every named tool: OpenAI describes its 2025 native 4o image generator as autoregressive. Check a product's documentation instead of inferring its architecture from the interface.\n\nAn open-weights path can provide more control over a particular model. Stable Diffusion and some Flux releases provide downloadable weights, with different licences. Fooocus documents SDXL support; ComfyUI and Krita integrations have their own supported models and requirements. Selected small or optimised setups may work with four gigabytes of graphics memory, while CPU-only generation can be much slower. Verify the exact model, hardware, licence and hosted-notebook limits; no fixed couple-of-minutes runtime or free hosting is guaranteed.\n\n## What the mechanism cannot do\n\nLearning image patterns does not guarantee exact object counts or arrangements. Ask for three cats and inspect the result: two or four cats is still a failure, however convincing the fur looks. Changing a prompt can also change details you wanted to keep. Masks let editing tools restrict an edit to a chosen region, but the result still needs checking. Diffusion models are not ordinary photo-retrieval systems, yet researchers have extracted reproductions of training pictures from some of them; do not assume that generation rules out memorisation."},"check":{"question":"In the diffusion setup described in this lesson, a model produces a convincing photograph from 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":"A diffusion generator is not an ordinary nearest-photo lookup. Some models can nevertheless memorise or reproduce training pictures; that risk is separate from the proposed universal retrieval-and-blending mechanism."},{"text":"It uses patterns learned by denoising noisy training pictures to guide a sequence of generative sampling steps.","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":"A plausible output does not establish reliable placement or counting of objects; inspect whether the requested objects are actually present."}]},"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. Source and assessment review continues. 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: 29 November 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":"A diffusion model learns to undo added noise; generation starts with noise and uses the learned denoising process to build an image. A convincing result still needs checks for counts, details and possible reproduction of training material.","hero":{"kind":"figure","figure":{"t":"figure","label":"Figure 6.1","figure":{"caption":"Training learns a denoising target across noise levels. Sampling then starts from noise and uses repeated guided steps, whose count depends on the model and sampler. A 64-by-64 latent grid for a 512-pixel-square example reduces spatial locations, but does not determine an image price. Some models can reproduce training images, so a new-looking result is not a novelty guarantee.","steps":[{"label":"Train on ruined photographs","detail":"Add noise at different levels and train a target such as predicting the added noise"},{"label":"Start from pure static","detail":"Start sampling with random values in the representation used by this model"},{"label":"Remove a little, guided by the prompt","detail":"Text conditioning influences the next denoising update; it need not just sharpen a fixed earlier choice"},{"label":"Use an illustrative twenty to fifty sampling steps","detail":"The actual count and update rule depend on the model and sampler"},{"label":"Decode back to pixels","detail":"Decode a candidate image; check requested details and possible reproduction of training examples"}],"title":"A diffusion example: training and guided generation","type":"flow"},"alt":"Figure: A diffusion example: training and guided generation. Steps: 1. Train on ruined photographs (Add noise at different levels and train a target such as predicting the added noise); 2. Start from pure static (Start sampling with random values in the representation used by this model); 3. Remove a little, guided by the prompt (Text conditioning influences the next denoising update; it need not just sharpen a fixed earlier choice); 4. Use an illustrative twenty to fifty sampling steps (The actual count and update rule depend on the model and sampler); 5. Decode back to pixels (Decode a candidate image; check requested details and possible reproduction of training examples). Training learns a denoising target across noise levels. Sampling then starts from noise and uses repeated guided steps, whose count depends on the model and sampler. A 64-by-64 latent grid for a 512-pixel-square example reduces spatial locations, but does not determine an image price. Some models can reproduce training images, so a new-looking result is not a novelty guarantee."}},"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 commonly writes one token at a time. Images can also be generated sequentially: PixelRNN demonstrated pixel-by-pixel prediction with dependencies on earlier pixels. This lesson follows a different approach, diffusion, which became widely used for image generation in 2022. Rather than choosing an arbitrary first pixel, it begins with noise and repeatedly refines an image."}]},{"t":"h2","id":"learn-to-reverse-added-noise","runs":[{"text":"Learn to reverse added noise"}]},{"t":"p","runs":[{"text":"In one illustrative forward-noising schedule, take a photograph and repeatedly add random noise over a thousand steps. At the end, the distribution is made close to pure noise. The exact schedule and endpoint depend on the method; a thousand is an example, not a requirement of every image generator."}]},{"t":"p","runs":[{"text":"Now train a network on the reverse: show it a noisy picture and ask it to predict a useful denoising target, such as the noise that was added. Across many pictures and noise levels, it learns patterns that help turn noisy inputs into plausible images. This does not mean that memorising individual training pictures is impossible."}]},{"t":"p","runs":[{"text":"Generation starts with noise and applies that learned denoising skill repeatedly. After the chosen sampling steps, an image emerges; the number of steps depends on the model and sampler. The result can be new, but some diffusion models can reproduce training examples. The technical name comes from diffusion, and influential papers developed the approach in 2015 and 2020."}]},{"t":"h2","id":"why-it-works-at-all","runs":[{"text":"Why it works at all"}]},{"t":"p","runs":[{"text":"The picture comes from a learned generative process. Training on many noise levels teaches the network patterns that guide reverse steps toward the training distribution. Starting from noise and sampling those steps can produce a plausible image. It is a helpful simplification to call this finding structure in static, but the model is not recovering a hidden original photograph, and each step need not merely sharpen a fixed earlier interpretation."}]},{"t":"h2","id":"the-trick-that-made-it-cheap","runs":[{"text":"The trick that made it cheap"}]},{"t":"p","runs":[{"text":"Stable Diffusion became publicly available in August 2022 using latent diffusion. An autoencoder maps a picture to a smaller representation: in a familiar 512-pixel-square setup, that representation has 64-by-64 spatial locations. Denoising happens there, and a decoder returns it to pixels. That grid has one sixty-fourth as many spatial locations; compute and memory savings also depend on channels, architecture and the sampling pipeline. Running the software still requires suitable hardware or a hosted service; no particular image price follows from the grid ratio."}]},{"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":"Image products include Midjourney, Adobe Firefly and image generation inside chatbots. Their capabilities and underlying designs vary by version. Diffusion is one important approach, not the architecture of every named tool: OpenAI describes its 2025 native 4o image generator as autoregressive. Check a product’s documentation instead of inferring its architecture from the interface."}]},{"t":"p","runs":[{"text":"An open-weights path can provide more control over a particular model. Stable Diffusion and some Flux releases provide downloadable weights, with different licences. Fooocus documents SDXL support; ComfyUI and Krita integrations have their own supported models and requirements. Selected small or optimised setups may work with four gigabytes of graphics memory, while CPU-only generation can be much slower. Verify the exact model, hardware, licence and hosted-notebook limits; no fixed couple-of-minutes runtime or free hosting is guaranteed."}]},{"t":"h2","id":"what-the-mechanism-cannot-do","runs":[{"text":"What the mechanism cannot do"}]},{"t":"p","runs":[{"text":"Learning image patterns does not guarantee exact object counts or arrangements. Ask for three cats and inspect the result: two or four cats is still a failure, however convincing the fur looks. Changing a prompt can also change details you wanted to keep. Masks let editing tools restrict an edit to a chosen region, but the result still needs checking. Diffusion models are not ordinary photo-retrieval systems, yet researchers have extracted reproductions of training pictures from some of them; do not assume that generation rules out memorisation."}]}],"check":{"question":[{"text":"In the diffusion setup described in this lesson, a model produces a convincing photograph from 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":"A diffusion generator is not an ordinary nearest-photo lookup. Some models can nevertheless memorise or reproduce training pictures; that risk is separate from the proposed universal retrieval-and-blending mechanism."}]},{"text":[{"text":"It uses patterns learned by denoising noisy training pictures to guide a sequence of generative sampling steps."}],"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":"A plausible output does not establish reliable placement or counting of objects; inspect whether the requested objects are actually present."}]}],"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}}}