Back to Learning Area

Image Generation

Creating images from descriptions — the math behind it, surprisingly mundane.

  • Fundamentals
  • 8 min
  • Beginner

Plain Language

This preview is in Plain Language. The whole portal is also available in Plain Language. You can change the language at the top. Or use the button below. Our Plain Language texts are AI-assisted and editorially reviewed. They follow the core principles of easy-to-read language, but they are not certified Easy Read: a review panel of people with learning difficulties does not test them.

Preview: Creating images with AI

How AI creates images

You type a description. Then the AI creates an image. The image is new. It has never been photographed before. The AI uses a diffusion model. Diffusion model means: the AI starts with noise. Then it refines the image step by step.

How to write a good prompt

A prompt is your description for the AI. A good prompt has three parts. Part 1: what should be in the image? Part 2: how should it look? Part 3: what should not be in the image? The more precisely you describe, the better the image.

Warning: AI images can trick you

AI images sometimes look like real photos. You cannot always tell the difference. Therefore, AI images can trick you. Someone can use them as proof for something false.

You type "a fox reading a newspaper in a cozy library, watercolor style" — and seconds later, an image appears that never existed before. No camera, no paintbrush, no artist. How does a machine turn words into pictures?

In this article, you will learn the fundamental mechanism behind tools like Midjourney, Stable Diffusion, and Flux. You will understand how text becomes an image, how prompts control the result, and why every image is unique — or can be.

Text-to-Image — How Words Become Pictures

Definition

Diffusion Model

Analogy

Imagine a sculptor facing a block of marble. The text prompt is the sculptor's vision. The noise image is the raw block. Each denoising step chips away material that does not belong — revealing the intended form underneath.

Example

The sculptor analogy captures the core process: stepwise refinement guided by text. But the model does not "reveal" a hidden image — it actively constructs a new one.

The Pipeline: From Text to Image

  1. 1. Text Embedding: prompt is translated into numerical values
  2. 2. Noise: starting image of pure randomnesslike TV static
  3. 3. Iterative Denoising: stepwise refinement to the final image

Example: The prompt "a cat wearing a top hat, oil painting style" produces dramatic lighting in Midjourney. GPT Image in ChatGPT renders the text literally. Stable Diffusion depends heavily on the loaded checkpoint (the selected model file). Same words, three different images — because each model learned different visual patterns.

Without AI

An artist interprets the description, chooses technique, colors, and composition. Result after hours or days.

With Diffusion Model

The model translates text into an embedding and refines noise in seconds. Every result is a new creation.

Caution

Warning: Photorealism

Current models regularly produce photorealistic output indistinguishable from photographs. This is not a flaw — it is the intended capability. The implications for disinformation are significant. Since 2 August 2026, the EU AI Act (Art. 50) requires deepfakes to be disclosed as artificially generated, and providers must mark AI images in a machine-readable way.

The field moves fast: on the Arena leaderboard (as of November 2026) OpenAI leads, followed by Microsoft and Google (Gemini, “Nano Banana”), among others. Four well-known players show the range, each with a different focus:

Midjourney Highest aesthetics. Artistic interpretation. Access via website and Discord.
GPT Image (OpenAI) Very high prompt fidelity, renders text cleanly in images. The image generator in ChatGPT since March 2025; its predecessor DALL-E 3 was also removed from OpenAI's API on 12 May 2026.
Stable Diffusion Open model weights (newer versions free only below $1M in annual revenue). Local use. Maximum control through checkpoints.
Adobe Firefly Commercial safety for Adobe's own models: trained on licensed Adobe Stock content and public-domain material. Partner models in Firefly, such as those from Google or OpenAI, are not automatically covered.

Caution

Misconception: AI images are always recognizable as artificial

This is a common misconception. Current models regularly produce photorealistic output indistinguishable from photographs. This capability is intentional and well-documented.

Interactive: Diffusion from Three Perspectives

How does the diffusion process turn noise into an image? Switch between three analogies to discover different perspectives on the same mechanism.

Prompt Craft — The Art of Description

Definition

Prompt

Analogy

Like ordering food at a restaurant: the subject is the dish ("spaghetti carbonara"), the style is the preparation ("al dente, traditional Roman"), the composition is the presentation ("on a white plate, natural lighting"). Negative prompts are allergies ("no cream, no peas"). The more precisely you order, the closer the result.

Example

The restaurant analogy conveys the core principle: precision improves results. Unlike a restaurant, though, there is no waiter to ask clarifying questions — the model interprets the prompt on the first try.

Three Layers of a Good Prompt

Subject What is depicted: "A golden retriever on a meadow"
Style How it looks: "Photorealism, sunlight, warm colors"
Composition & Negatives Perspective and exclusions: "Close-up" + Negative: "blurry, cartoon, deformed"

Word order matters: "A beautiful sunset over mountains" generates a different image than "Mountains with a beautiful sunset" because Stable Diffusion and similar models give more weight to what comes first.

Caution

Misconception: Longer prompts always produce better images

Clarity and precision matter more than word count. Older models such as Stable Diffusion 1.5 process only 77 tokens at a time with their text encoder; there, a focused 10-word prompt often beats a rambling 50-word description. Newer models like Gemini, on the other hand, understand full sentences well: Google explicitly recommends describing the scene instead of stringing keywords together.

Seed & Reproducibility — Why Every Image Is Unique

Definition

Seed

Analogy

A recipe (prompt) cooked by a chef (model) in a kitchen (seed). The same recipe in the same kitchen produces the same dish. Change the kitchen (seed) and the dish turns out differently, even with the same recipe.

Example

The kitchen analogy conveys: same starting conditions = same result. Unlike a kitchen, the seed conditions are mathematically exact.

The Seed Experiment

Seed 42 + Base Prompt "Sunset over ocean" → A specific image with a particular composition.
Seed 42 + Extended Prompt "Sunset over ocean, dramatic clouds" → Same base composition, added clouds.
Seed 123 + Base Prompt "Sunset over ocean" → Completely different layout, despite the same prompt.
10 Steps vs. 50 Steps More steps (denoising steps) = finer textures. But beyond ~30–50 steps, improvements diminish.

CFG Scale determines how strictly the model follows the prompt. High value = literal execution at the cost of image quality (too-high values produce oversaturated, unnatural artifacts). Low value = more creative freedom. Steps define the number of denoising iterations. Values between 20 and 50 offer a good balance of quality and speed.

Caution

Misconception: Every generation is completely random

With a fixed seed, generation is deterministic and reproducible. This is essential for professional work: iterating on a composition, debugging quality issues, or maintaining consistency across a series.

Note

Key Takeaways

  • Text-to-image models generally do not copy training images (only rarely do they reproduce memorized images almost exactly) — they learn visual patterns and create entirely new images from noise, guided by text embeddings.
  • A good prompt is structured (subject → style → composition), precise, and uses negative prompts where the model supports them. Word order matters: early words carry more weight.
  • The seed determines the random starting point. Same prompt + same seed + same model + same settings = identical image. A different seed creates a completely different image.

Check

Quiz: Image Generation

What is the role of the "text embedding" in a text-to-image model?

Select one answer

Answer Key: 1) B · 2) B · 3) C · 4) B · 5) B · 6) B

Check

Checkpoint: Image Generation

Can you explain this in your own words? Tick what you've got.

0 of 3 done