From words to pixels
Type a sentence such as ‘a falcon over the desert at sunset’ and, within seconds, a photograph-like image appears. Most modern image generators, including the systems behind several well-known tools released since 2022, use a technique called diffusion. The name comes from physics, where diffusion describes how a drop of ink spreads until it is evenly mixed. In these models, the spreading is done to images: structure is gradually destroyed by adding noise, and the model learns how to run that process backwards. The result is a system that can produce new pictures that match a description, rather than retrieving existing ones from a database.
Training by destruction
Training starts with a vast collection of images, each paired with a caption. The system takes an image and adds a small amount of random noise, like television static, then a little more, over many steps. In the influential 2020 formulation, there were 1,000 such steps, by the end of which nothing of the original remained. At random points along this path, a neural network is shown the noisy image, the step number and the caption, and asked to predict exactly which noise was added. Its guess is compared with the truth and its internal weights are nudged to do better. Repeated billions of times, this teaches it what real images look like at every level of noise.
Generation in reverse
To create a picture, the process runs the other way. The model starts with a grid of pure random noise and predicts the noise it contains, given the prompt. A portion of that predicted noise is subtracted, leaving something slightly more structured. This repeats, typically 20 to 50 times in practical systems. Early steps settle the broad layout and colours, such as a bright horizon and a dark shape; later steps add edges, texture and fine detail. Because each run begins from different random noise, the same prompt gives a different image every time. Fixing the starting noise, known as the seed, lets users reproduce a result exactly or make small variations.
How text steers the picture
The prompt is first turned into numbers by a text encoder, a separate network trained to place words and images that belong together close to each other. Those numbers are fed into the denoising network at every step, so it predicts noise that moves the image towards the description. A technique called classifier-free guidance strengthens this effect by comparing predictions made with and without the prompt and exaggerating the difference. Many systems also work in a compressed ‘latent’ space instead of on raw pixels. A 512 by 512 colour image holds 786,432 numbers, while its latent version might hold 16,384, 48 times fewer, which makes generation far cheaper and faster.
A short history
Earlier image generators mostly used generative adversarial networks, introduced in 2014, in which one network forges images and another tries to spot the fakes. They produced sharp faces but were hard to train and struggled with varied scenes. Diffusion ideas appeared in research in 2015, and a 2020 paper showed they could rival or beat adversarial networks on image quality. In 2022 latent diffusion and powerful text encoders combined to put prompt-driven image generation in the hands of the public. The same principle has since been extended to video, audio, 3D shapes and even the design of protein molecules, all treated as data that can be noised and then reconstructed.
Limits and open questions
Diffusion models learn statistical patterns, not facts about the world, so they can still produce hands with extra fingers, garbled lettering or physically impossible reflections, though newer models make fewer such errors. They can also reproduce biases in their training data, for example in how professions are portrayed. Questions over the use of copyrighted images for training are being argued in courts and parliaments in several countries. Because the outputs can be convincing, companies and standards groups are adding invisible watermarks and signed records of how a file was made. For users, the safest assumption is that any striking image online may be generated unless its origin can be checked.
Sources & further reading
- Ho et al. · Denoising Diffusion Probabilistic Models (arXiv) ↗
- Rombach et al. · High-Resolution Image Synthesis with Latent Diffusion Models (arXiv) ↗
Figures are rounded and widely published; check the linked organisations for the latest editions. These organisations do not endorse this website.



