Text-to-Image AI: The Basics
How text-to-image AI turns a written description into a picture, what diffusion models do, and what to expect from on-device image generation.
Text-to-image AI creates pictures from written descriptions. Type "a red bicycle leaning against a blue door" and the model paints an image to match.
How it works, roughly
Most modern image generators are diffusion models. During training, they learn to remove noise from images, step by step, guided by descriptions. To generate a new image, the model starts from random noise and gradually refines it into an image that fits your prompt. Each step makes it a little clearer.
The parts involved
- A text encoder turns your words into numbers the model can understand.
- The main model gradually shapes noise into an image, guided by those numbers.
- A decoder turns the result into a full-colour picture.
Steps and speed
More steps usually means more detail but takes longer. Some newer models are designed to produce good images in only a few steps, which makes them practical on personal devices.
On-device generation
Image generation is demanding. Running it on your own device needs a capable graphics card, WebGPU support in the browser, and a large model download, often several gigabytes. In return, your prompts and images stay on your device. See WebGPU explained.
What to expect
- Results vary each time, even with the same prompt.
- Hands, text and complex scenes are often imperfect.
- Very specific requests may be interpreted loosely.
- Generated images can reflect biases in training data.
Better prompts help
Clear, specific prompts usually produce better results. See writing good image prompts.
Use responsibly
Generated images can look real. Don't use them to mislead, impersonate people or create harmful content, and label them when they could be mistaken for photos. See labels for AI-generated images.
In BGZone
The Image Playground creates pictures from words with models that run on your graphics card. It needs WebGPU and a large first download, and its pictures are labelled as AI-generated. See the Image Playground.