Availit World How AI really works, in your language

Lesson 39 of 4645 minFacts checked October 21, 2026

Making pictures and video

Type “a girl reading under a mango tree at sunset” and a few seconds later a picture appears that never existed. Stretch the same idea through time and you get video. This lesson shows how it works: models that start from pure noise and wipe it away step by step, the tricks that make them fast enough for a home computer, why five seconds of video costs so much more than one picture, when these models copy and when they create, why most of them still write badly in scripts other than Latin and Chinese, and how to use them honestly.

In this lesson you will

  • Tell apart the two ways of making pictures: one token at a time, or diffusion
  • Explain how diffusion and flow matching teach a network to remove noise, and how making a picture runs that backwards
  • Explain why models work in a VAE’s small latent space, and how a diffusion transformer turns it into tokens
  • Describe how a prompt steers a picture, and how distillation cuts the number of steps
  • Work out how many tokens a video becomes, and why video costs so much more than pictures
  • Run a tiny diffusion model and see the difference between copying the training data and making something new
  • Know the limits, from text in your script to physics, and the rules for using made-up pictures honestly
On this page
  1. Two ways to make a picture
  2. Diffusion: learning to remove noise
  3. Working in a smaller space
  4. Steering with words, and saving steps
  5. Video: pictures through time
  6. Copying and creating
  7. Words in pictures, and whose world they show
  8. Using it honestly
  9. Make one on your own computer
  10. Remember
  11. Check yourself

Two ways to make a picture

A model that makes a 1024 × 1024 picture has to produce more than 3 million numbers (three colours for each pixel), and they all have to fit together: the shadow has to match the sun, and the left eye has to match the right one. Today there are two main ways to do it.

The first works like a language model. A picture tokenizer turns any picture into a grid of codes taken from a fixed list, its codebook, and a decoder turns codes back into pixels. A transformer then learns to predict the codes one after another, left to right and top to bottom, exactly as it predicts words (the press-enter lesson). DeepSeek’s Janus-Pro works this way: a 384 × 384 picture is 576 codes. Janus gives the model two separate eyes, one encoder for understanding pictures and another tokenizer for drawing them, because the two jobs need different details. VAR, from ByteDance and Peking University, predicts a whole small picture first and then larger and larger versions of it, and won a best-paper award at NeurIPS 2024.

The second way is diffusion: start from pure random noise and remove a little of it at a time, over many steps, until a picture is left. Every step works on the whole picture at once. Nearly all of today’s leading open image and video models work this way, including FLUX, Qwen-Image, Wan and HunyuanVideo, so most of this lesson is about diffusion.

Two families
One token at a timeDiffusion
How it makes a picturePredicts picture codes in order, like wordsCleans noise off the whole picture, step by step
ExamplesJanus-Pro (DeepSeek), VAR (ByteDance)FLUX, Qwen-Image, Wan, HunyuanVideo
StrengthOne model can read and write text and picturesThe best picture quality, and easy editing
WeaknessHundreds or thousands of passes, one per code; the codebook loses fine detailMany passes over the whole picture, each one costly

Some models mix the two, for example by writing a rough plan as tokens and finishing it with diffusion.

Quick check

Janus-Pro writes a picture as 576 codes, one at a time. What does that have in common with a language model?

Show the answer

Answer: It predicts the next code from the codes before it, the way a language model predicts the next word The codes are tokens. The same transformer, the same next-token training and the same KV cache (the KV-cache lesson) work for them.

Diffusion: learning to remove noise

Training a diffusion model starts with real pictures and spoils them on purpose. Add a little random noise to a photo, and it is still easy to see. Add more, then more, until nothing is left but static, like an old television with no signal. At every level of noise, the network is shown the spoiled picture and asked one question: which noise was added? The 2020 paper that made this work well was called DDPM.

Spoiling a picture, and the question the network answers
noisy = √ā × clean + √(1 − ā) × noise

ā (alpha-bar) goes from 1 to 0 as the noise level rises: at the start it is all picture, at the end all noise

error = (noise − guess)²

the network guesses the noise; training makes this squared error smaller, as in the learning-downhill lesson

1,000

levels of noise in the original paper

To make a new picture, run it backwards. Start from pure noise, ask the network which noise is there, take away part of it, and ask again. Each answer is a guess, but each step makes the picture a little clearer, and the next guess is easier. The original model needed all 1,000 steps; better ways to take the steps soon cut that to about 50.

Try itWatch noise turn into a picture

This interactive part needs JavaScript.

The demo shows what a picture looks like at each level of noise, from static to clear. It cheats: it already knows the finished picture and only mixes it with less and less noise. A real model never sees the answer. At every step it has to work out what picture could be hiding under the noise, and the picture you would watch appear is its guess.

In 2022 two groups found a simpler path, called flow matching or rectified flow. Draw a straight line from the clean picture to the noise. Every point on the line is a mix of the two. The network learns the direction of the line, called the velocity. To make a picture, start at the noise end and walk against that direction, back to the picture end. Straight paths can be walked in fewer, bigger steps. Stable Diffusion 3, FLUX, Wan and Qwen-Image are all trained this way.

Flow matching
noisy = (1 − t) × clean + t × noise

a straight line: t = 0 is the picture, t = 1 is pure noise. Papers write xₜ = (1 − t)x₀ + tε

velocity = noise − clean

which way, and how far, the line runs from picture to noise

error = (velocity − guess)²

the network learns to guess the velocity from the noisy picture and t

next = noisy − step × guess

one step back towards the picture; repeat until t = 0

Quick check

With flow matching, what is the noisy picture at t = 0.25 made of?

Show the answer

Answer: 75 % picture and 25 % noise (1 − 0.25) = 0.75 of the clean picture plus 0.25 of the noise. It is near the picture end of the line, so only a little cleaning is left to do.

Working in a smaller space

Running a big network over all 3 million numbers of a 1024 × 1024 picture, 50 times over, is far too slow. The 2021 paper behind Stable Diffusion, on latent diffusion, found a way round it. First train a separate network, a VAE (variational autoencoder), that squeezes a picture into a much smaller grid of numbers, its latent, and can turn that grid back into the picture almost perfectly. Then do all the diffusion in that small space.

How much smaller
512 × 512 × 3 = 786,432

numbers in a 512 × 512 picture

64 × 64 × 4 = 16,384

numbers in its latent: each side 8 times smaller, with 4 channels instead of 3 colours

786,432 ÷ 16,384 = 48

times fewer numbers for the denoiser to work on

Making a picture with a latent diffusion model
  1. Promptyour words
  2. Text encoderone vector per token, read once
  3. Denoiserstarts from noise in the latent space and cleans it, step after step
  4. VAE decoderturns the clean latent into pixels, once
  5. Picturefor example 1024 × 1024

The denoiser used to be a U-Net, a convolutional network (the before-transformers lesson). Since the 2022 paper on diffusion transformers (DiT) it is usually a transformer: cut the latent into patches of 2 × 2 squares, turn each patch into a token, and run transformer layers, just as a vision transformer does with a photo (the vision lesson). Stable Diffusion 3 and FLUX put the text tokens and the picture tokens into the same attention, each with their own weights, so every word can look at every part of the picture and back. This design is called MMDiT.

Tokens in one picture
1024 ÷ 8 = 128

latent squares along each side, after the VAE

128 ÷ 2 = 64

tokens along each side, after 2 × 2 patches

64 × 64 = 4,096

tokens, processed again at every step

Quick check

A model’s VAE makes each side 8 times smaller, and its transformer uses patches of 2 × 2. How many tokens is a 512 × 512 picture?

Show the answer

Answer: 1,024 512 ÷ 8 = 64 latent squares a side, and 64 ÷ 2 = 32 tokens a side. 32 × 32 = 1,024.

Steering with words, and saving steps

A denoiser that is given the prompt still tends to drift towards a safe, average picture. The fix most models use is classifier-free guidance (2022). At every step, run the network twice: once with your prompt and once with an empty prompt. The difference between the two answers points in the direction your words pull. Then go further in that direction than the network would on its own.

Classifier-free guidance
guided = without + w × (with − without)

w = 1 is the plain answer with the prompt; a larger w follows the prompt harder

w ≈ 5

a typical value for video models such as Wan

50 steps × 2 passes = 100

passes through the whole network for one picture

A negative prompt uses the same trick. Instead of an empty prompt, the second pass gets a description of what you do not want, such as “blurry, extra fingers, text”, and guidance pushes the picture away from it. It costs nothing extra, because the second pass runs anyway.

One hundred passes through a network with billions of weights takes time. Distillation cuts it down: a finished model, the teacher, makes pictures in 50 steps, and a student model learns to get the same result in far fewer, bigger steps. Methods have names such as progressive distillation, consistency models and adversarial distillation, which adds a judge as in a GAN. Guidance can be learned by the student too, so it needs only one pass per step.

Network passes for one picture
ModelStepsPasses per stepPasses in all
A typical model without distillation502 (with guidance)100
FLUX 3 Image Klein, distilled (October 2026)161 (no guidance)16
Qwen-Image-2.1-Turbo81 (guidance set to 1)8

Steps and guidance from the makers’ model cards and announcements.

Put distillation together with 8-bit numbers (the quantization lesson) and the savings multiply. Tests published with FLUX 3 Image Klein report that one 1024 × 1024 picture takes 78 seconds on an RTX 4070 at 50 steps with 16-bit numbers, and under 9 seconds with the distilled model in 8 bits.

Quick check

A model uses 30 steps and classifier-free guidance, two passes per step. How many network passes does one picture need?

Show the answer

Answer: 60 Two passes, one with the prompt and one without, at each of the 30 steps: 60 in all. That is why distilling the guidance away halves the time.

Video: pictures through time

A video is pictures in a row, usually 16 or 24 of them a second. Make each frame on its own and they flicker: the shirt changes colour, the tree moves. So video models make the whole clip at once, as one block of space and time. OpenAI’s 2024 report on Sora called the tokens spacetime patches: small boxes that cover a few pixels across, a few down and a few frames deep.

Alibaba’s Wan models show the recipe in the open. Wan’s VAE squeezes every 4 frames into 1 latent frame and each side 8 times. It keeps the first frame on its own, so a single picture is simply a video one frame long. Then the transformer cuts patches of 2 × 2, as for pictures.

Wan2.1: five seconds at 480p
16 × 5 + 1 = 81

frames: 16 a second for 5 seconds, plus the first frame

1 + 80 ÷ 4 = 21

latent frames: the first one alone, then one for every 4

832 ÷ 16 = 52 and 480 ÷ 16 = 30

tokens across and down: 8 times from the VAE, then 2 from the patches

21 × 52 × 30 = 32,760

tokens, at every step

Try itHow many tokens is a video?

This interactive part needs JavaScript.

Attention compares every token with every other one (the attention lesson), so its work grows with the square of the number of tokens. Five seconds of 720p in Wan2.1 is 75,600 tokens, about 18 times a 1024 × 1024 picture, and about 340 times the attention work. Wan’s report says that at a million tokens, attention takes up to 95 % of the training time. This is why video is the most expensive thing these models make.

Wan2.2 (July 2025) added two ideas worth knowing. The first is experts by noise level (the mixture-of-experts lesson): one expert handles the early, noisy steps that set the layout, and another handles the late steps that add detail, just like the fog lifting. Together they have 27 billion parameters, but only one expert of about 14 billion runs at each step. The second is a VAE that squeezes harder, 16 times along each side, so the small TI2V-5B model makes 720p video at 24 frames a second from fewer tokens than Wan2.1 needs for 480p. Its makers say it makes five seconds in under 9 minutes on one consumer graphics card.

Long videos are rarely made in one piece. They are made in parts, each part looking back at the frames before it. Sand AI’s MAGI-1 is built for this: it cleans one short chunk of frames after another, so the video can keep growing.

Open video models from Chinese labs
ModelLabFirst releasedWorth knowing
Wan2.1, Wan2.2AlibabaFebruary 2025, July 2025Apache 2.0 licence, from 1.3 to 27 billion parameters
HunyuanVideoTencentDecember 202413 billion parameters, with a full technical report
CogVideoXZhipu AI and Tsinghua UniversityAugust 20242 and 5 billion parameters, an early open video model
Step-Video-T2VStepFunFebruary 202530 billion parameters, clips of up to 204 frames
MAGI-1Sand AIApril 2025Makes video chunk by chunk, so clips can grow
Open-Sora 2.0HPC-AI TechMarch 2025Its makers report training it for about 200,000 US dollars

From each lab’s report or code page. Several strong video models from China, such as Kling and Seedance, are closed.

Do video models understand the world they show? A 2024 study by ByteDance and Tsinghua researchers trained video models on simple simulated balls that move and bounce by the laws of physics. Within the range of their training, the models were nearly perfect. Outside it, they failed, and more data or bigger models did not fix it. Instead of learning the laws, they copied the most similar training example, matching colour first, then size, then speed, and shape last. A made-up video is not evidence of how anything really moves.

Quick check

Five seconds of 720p in Wan2.1 is 75,600 tokens; one 1024 × 1024 picture is 4,096. Roughly how much more attention work is the video at each step?

Show the answer

Answer: About 340 times The video has about 18.5 times the tokens. Attention compares every pair, so its work grows with the square: 18.5 × 18.5 ≈ 341.

Copying and creating

Here is a puzzle. Suppose a denoiser were perfect for its training set: at every step it worked out exactly which training picture could be behind the noise. Walking back from noise would then always end on one of the training pictures. A perfect model would only copy. Yet real models make pictures nobody has seen. The program below lets you watch both happen, with points on a circle instead of pictures.

tiny_diffusion.py: noise to points, step by steppython
"""tiny_diffusion.py: turn noise into new points, step by step, the way image models turn noise into pictures.
pip install numpy, then: python tiny_diffusion.py"""
import numpy as np

rng = np.random.default_rng(0)

# The training set: 12 points on a circle. An image model has millions of pictures instead.
angles = np.linspace(0, 2 * np.pi, 12, endpoint=False)
data = np.stack([np.cos(angles), np.sin(angles)], axis=1)

def denoise(x, t, blur=0.0):
    """The best guess of the clean point behind each noisy point x, at noise level t (1 = pure noise)."""
    s = max(t, blur)  # blur > 0 imitates a network, which is never as sharp as this formula
    # x = (1 - t) * clean + t * noise, so ask how well each training point explains x
    d2 = ((x[:, None, :] - (1 - t) * data[None, :, :]) ** 2).sum(-1)
    w = np.exp(-(d2 - d2.min(1, keepdims=True)) / (2 * s * s))
    w /= w.sum(1, keepdims=True)
    return w @ data  # a weighted average of the training points

def sample(n, steps, blur=0.0):
    x = rng.standard_normal((n, 2))  # start from pure noise
    ts = np.linspace(1, 0, steps + 1)
    for t, t_next in zip(ts[:-1], ts[1:]):
        velocity = (x - denoise(x, t, blur)) / t  # the direction from the clean point towards the noise
        x = x - (t - t_next) * velocity           # one step back, against that direction
    return x

def report(name, x):
    off = np.abs(np.linalg.norm(x, axis=1) - 1).mean()
    nearest = np.linalg.norm(x[:, None, :] - data[None, :, :], axis=-1).min(1)
    print(f"{name:<24} distance from the circle {off:.3f}   copies of a training point {np.mean(nearest < 0.01):4.0%}")

report("pure noise", rng.standard_normal((1000, 2)))
report("1 step", sample(1000, 1))
report("4 steps", sample(1000, 4))
report("50 steps", sample(1000, 50))
report("50 steps, a little blur", sample(1000, 50, blur=0.3))
report("50 steps, a lot of blur", sample(1000, 50, blur=0.6))
  • The training set is 12 points on a circle. A new point counts as good if it lands on the circle, and as a copy if it lands on one of the 12 points.
  • denoise is the perfect answer for this training set: a weighted average of the training points, weighted by how well each one explains the noisy point. Real models learn an approximation of it from examples.
  • sample is flow matching from the earlier section: start from noise at t = 1, estimate the velocity, and step back to t = 0.
  • blur makes the denoiser less sharp than perfect, a stand-in for the limits of a real network. It runs in about a second on an ordinary computer, with no graphics card.
What it printedtext
pure noise               distance from the circle 0.539   copies of a training point   0%
1 step                   distance from the circle 1.000   copies of a training point   0%
4 steps                  distance from the circle 0.101   copies of a training point   0%
50 steps                 distance from the circle 0.000   copies of a training point 100%
50 steps, a little blur  distance from the circle 0.051   copies of a training point   0%
50 steps, a lot of blur  distance from the circle 0.405   copies of a training point   0%
  • 1 step: every point lands at the centre of the circle, 1.000 away from it. At pure noise, every training point is equally likely, so the best single guess is their average. In pictures, the average of everything is a grey blur, which is what one undistilled step gives.
  • 4 steps: close to the circle already. 50 steps: exactly on it, and every point is a copy of a training point. The perfect denoiser only memorises.
  • A little blur: still close to the circle, but no copies. The points spread all the way round it, into places the training set never had a point. That is new output that still fits the data.
  • A lot of blur: too far from perfect, and the points miss the circle. A model has to be good, but not perfect, to create.

Real models still copy sometimes. In 2023 Nicholas Carlini and colleagues pulled more than a thousand training pictures back out of image models, including Stable Diffusion, mostly pictures that appeared many times in the training data. So a model can reproduce a real person’s photo or an artist’s work. Never assume that what it makes is new.

Quick check

In tiny_diffusion.py, why does the perfect denoiser make only copies after 50 steps?

Show the answer

Answer: Because it knows exactly which training points exist, and walking back without error always ends on one of them With no error at any step, the walk ends where the data is, which is on the 12 training points. A slightly imperfect denoiser lands between them.

Words in pictures, and whose world they show

Ask a good model today for a shop sign that says “Pharmacy” in English, and it will usually spell it right. Ask for the same sign in Urdu, Arabic, Hindi or Bengali and it is a different story. A 2025 benchmark of popular models across many scripts found illegible letters, broken shapes and wrong words in non-Latin scripts, worst for scripts like Arabic and Chinese.

Chinese has improved fastest because Chinese labs trained for it on purpose. Qwen-Image’s makers built a test of 8,105 common characters, one per picture. Their model drew 58 % of them correctly, against 33 % for ByteDance’s Seedream 3.0 and 36 % for an OpenAI image model. That is their own test of their own model, and even the leader got about four in ten wrong. Comparable tests for Urdu, Pashto or Sindhi are hard to find.

Pictures carry culture too. The CUBE benchmark (2024) asked models for the food, landmarks and art of eight countries and found large gaps: a famous temple in India drawn wrongly, a Japanese dish turned into a cartoon. A short prompt about a culture tends to return a narrow, repeated picture of it. Describe what you mean in detail, and ask someone who knows the place to check.

Is each job fine for an image model with a quick look, or one to check carefully or avoid?

0 of 8 sorted
  • A colourful background for a school poster

    Answer: Fine with a quick look

  • A poster that shows the dose of a medicine

    Answer: Check carefully or avoid

  • Pictures for a story about a talking goat

    Answer: Fine with a quick look

  • A picture of a real politician at an event that never happened

    Answer: Check carefully or avoid

  • A labelled diagram of the heart for a biology class

    Answer: Check carefully or avoid

  • Ideas for how to lay out a classroom display

    Answer: Fine with a quick look

  • An “old photo” of your town to show as history

    Answer: Check carefully or avoid

  • A sign with words in Urdu or Pashto

    Answer: Check carefully or avoid

Using it honestly

The tool that draws a storybook goat can also make a fake photo of a real person. A few rules protect other people and you: never make a picture or video of a real person without their permission; never show a made-up picture as a real photo; and say clearly when a picture or video was made by AI.

Governments and companies are building labels. Since 1 September 2025, China’s rules require AI-made text, pictures, video and sound to carry a visible label and a hidden one in the file’s data. C2PA “content credentials” are a signed record, stored in the file, of how it was made and changed. Google’s SynthID hides a watermark in the pixels themselves.

When a surprising picture or video reaches you, ask who posted it first, whether trustworthy news sources report the same event, and whether a reverse image search finds an older or different version. Odd hands, garbled text and wrong shadows used to give fakes away; newer models make fewer of these mistakes, so checking the source matters more than staring at the pixels.

Quick check

A video of a famous person arrives with no AI label. What does that tell you?

Show the answer

Answer: Nothing on its own: check where it came from Labels can be lost, and many tools never add one. Only the source, and other reports of the same event, can tell you more.

Make one on your own computer

You do not need a paid service. Open models now make pictures on a mid-range graphics card, and short videos on a large one. The figures below come from the models’ makers; they were not measured for this lesson.

What runs at home
ModelMakesGraphics memorySpeed reported
FLUX 3 Image Klein, 8-bitPictures, up to 4K, and edits8 GBUnder 9 seconds for 1024 × 1024 on an RTX 4070
Qwen-Image-2.1-TurboPictures and editsMore: a 7-billion-parameter denoiser plus its text encoder8 steps; smaller 4-bit versions made by others exist
Wan2.1 T2V-1.3B5 seconds of 480p video8.19 GBAbout 4 minutes on an RTX 4090
Wan2.2 TI2V-5B5 seconds of 720p videoA 24 GB card such as the RTX 4090Under 9 minutes

From the makers’ model cards, reports and announcements, October 2026.

  1. Install ComfyUI, a free program that runs these models on your computer. It has a ready-made Windows version.
  2. Download a model’s files from Hugging Face. Some, such as FLUX 3 Image Klein, are gated: you accept the maker’s terms on the model page first.
  3. Open the Templates panel and pick the template for that model.
  4. Write a prompt, choose a size, and run it. Start small, such as 768 × 768 or two seconds of video, to learn how long your computer takes.
  5. Write down the seed, the number that chose the starting noise. The same seed with the same settings gives the same picture again, so you can change one thing at a time.

If you prefer Python, the diffusers library runs the same models, and most model cards show a short example. Online services and free notebooks can run them too, but then your prompts and pictures leave your computer, and a service can close, as Sora did.

Remember

  • Pictures can be made one token at a time, like text (Janus-Pro), or by diffusion, which cleans noise off the whole picture over many steps. Most leading open models use diffusion.
  • Training adds noise to real pictures and teaches a network to undo it. Flow matching draws a straight line from picture to noise and learns its direction, which allows fewer steps.
  • Models work in a VAE’s latent space, 8 or 16 times smaller along each side, and a transformer turns 2 × 2 patches of it into tokens: 4,096 for a 1024 × 1024 picture in Wan2.1’s design.
  • Classifier-free guidance runs the network with and without the prompt and pushes further towards the prompt. Distillation cuts 100 passes to 8 or 16.
  • Video is one block of space and time. Five seconds of 480p in Wan2.1 is 32,760 tokens, and attention work grows with the square of that.
  • A perfect denoiser only copies its training data; real models create because they are imperfect, and they still sometimes copy.
  • Text in non-Latin scripts and pictures of less-photographed cultures are weak spots. Add important words yourself, and check.
  • Never fake a real person, never pass a made-up picture off as real, and remember that a missing label proves nothing.

Words to know

Diffusion model
A model that makes pictures, video or sound by starting from noise and removing it step by step.
Denoiser
The network inside a diffusion model that guesses, at each step, what noise to remove.
Flow matching
Training a model to learn the direction of a straight line from a clean picture to noise. Also called rectified flow.
Velocity
In flow matching, the direction and distance from the picture to the noise. The model guesses it and steps against it.
Latent
The small grid of numbers a VAE turns a picture into. Diffusion happens there, not on the pixels.
VAE
Variational autoencoder: a network that squeezes a picture into a latent and turns it back again.
DiT
Diffusion transformer: a denoiser that cuts the latent into patches and treats each patch as a token.
Text encoder
The model that turns a prompt into the vectors the denoiser reads. It decides which languages the prompt can use.
Classifier-free guidance
Running the denoiser with and without the prompt and pushing further in the direction of the prompt.
Negative prompt
A description of what you do not want, used in place of the empty prompt in guidance.
Distillation
Training a fast student model to match a slow teacher in far fewer steps.
Spacetime patch
A token of a video: a small box a few pixels across, a few down and a few frames deep.
Seed
The number that chooses the starting noise. The same seed and settings give the same picture.
Memorisation
A model reproducing a training example instead of making something new.
Content credentials (C2PA)
A signed record inside a file that says how it was made and changed.
Deepfake
A made-up picture, video or voice of a real person, made to look real.

Go to the source

This lesson is built on these papers and documents. Paper links open arxiv.org, a separate site.

Check yourself

6 questions. Tap the answer you think is right.

0 of 6 answered

What does a diffusion model learn during training?

Show the answer

Answer: To guess the noise (or the direction to the noise) in pictures that were spoiled on purpose Training adds noise to real pictures and asks the network what was added. Making a picture runs that backwards, from pure noise.

Why do most image models work in a VAE’s latent space instead of on pixels?

Show the answer

Answer: The latent has many times fewer numbers, so every step costs far less A 512 × 512 picture has 786,432 numbers; its latent has 16,384, which is 48 times fewer. The VAE turns the result into pixels once, at the end.

What does classifier-free guidance cost?

Show the answer

Answer: A second pass through the network at every step, with an empty or negative prompt Each step runs with and without the prompt, which doubles the work unless the guidance is distilled into the model.

A video model doubles both the width and the height of its videos. Roughly how does the attention work at each step change?

Show the answer

Answer: It grows about 16 times Doubling both sides gives 4 times the tokens, and attention compares every pair, so the work grows 4 × 4 = 16 times.

In tiny_diffusion.py, what happened with a slightly imperfect denoiser?

Show the answer

Answer: The points stayed close to the circle but were no longer copies of the training points A little blur kept the points near the circle and spread them between the training points: new output that still fits the data. Too much blur missed the circle.

You need a poster that shows a medicine dose in Urdu. What is the safest way?

Show the answer

Answer: Make the picture without text, then type the words yourself in a proper Urdu font and check them Image models often draw non-Latin letters wrongly. Words that must be exact should be typed, not drawn.

Lesson complete

Answer every question above to complete this lesson.

Your progress is saved on this device only.

Next lessonSpeech and sound: models that listen and talk
Previous lesson All lessons

Choose your language