Topic: generative-and-multimodal

Reading: 25 min, plus 2 in closed details. Models that generate images, video and audio, and models that see and read: the map of the field, the comparisons that only show across its nine child pages, and the definitions they need. Two labs measure what no child does (zero-shot prompts on CLIP and SigLIP 2; SmolVLM end to end), and a model map dates every model and licence. Data as of October 2026.

The idea. Making images and reading them are two pipelines built from the same few parts: a generator turns random noise into a small latent through tens of denoising passes and decodes it to pixels once; a reader cuts an image into patch tokens that a language model attends to like words; a native multimodal model runs both inside one transformer.

You need the transformer (attention, a block, a language model’s next-token loss): The transformer from zero if it is rusty. The derivations behind the losses (ELBO, scores, guidance, flow matching) are on Variational inference and generative-model maths; nothing here needs them.

New terms on this page (each defined again where it is used):
multimodal
takes in or produces more than one kind of data (images and text, video and audio)
latent
a compressed version of the image (Stable Diffusion: 64 × 64 × 4 numbers for 512 × 512 pixels) that the generator works on
denoiser, pass
the network that removes a little noise; one run of it is a pass, and an image costs tens of them
guidance (CFG)
running the denoiser with and without the prompt and pushing past the difference; two passes per step
patch token
one square of pixels turned into one vector by a vision transformer
connector
the small network that maps encoder vectors to a language model’s width
early fusion
images enter one transformer as tokens beside text, from the first layer
FID
a distance between the features of real and generated images; lower is better

The running example. Every small model in the topic trains on Fashion-MNIST: 70,000 grey 28 × 28 images of clothing in 10 classes (MIT licence, Zalando), padded to 32 × 32; clothing shows blur, dropped modes and class confusions by eye, and a 1M-parameter U-Net learns it in minutes on a laptop GPU. Sixteen fixed test images are used for every before/after. The pretrained models, pinned to exact revisions, are Stable Diffusion v1.5 (CreativeML OpenRAIL-M), CLIP ViT-B/32, SigLIP 2 base and the VLM SmolVLM-500M-Instruct (both Apache 2.0), run on sixteen colour test images with known answers (photographs in the public domain or CC0, synthetic scenes, Stable Diffusion outputs). Details and licences: the root’s src/data/README.md.

Labels: measured means produced for this topic in October 2026 on an Apple M1 Pro (GPU through PyTorch’s MPS backend, or CPU); vendor, a lab’s figure about its own model; third-party, someone without a stake; derived, computed with the formula shown; unconfirmed, no primary source. Counts (steps, passes, tokens) transfer to a datacenter GPU; laptop seconds do not.

Two pipelines from shared parts: every box is a child page

Shared parts tie the lanes together: CLIP’s text tower is Stable Diffusion 1.5’s text encoder and its image tower was the first open VLMs’ encoder; the autoencoder that compresses for a generator also tokenises images for a native model; the transformer of the bottom lane became the denoiser of the top one (DiT).

1. Five ways to generate, three ways to understand

An image of 28 × 28 grey pixels is a point in a 784-dimensional space; almost every point is static, and the images that look like clothing fill a tiny, oddly shaped region of it. We never get a formula for that region (the data distribution p(x)), only examples. A generative model is a recipe for drawing new points from it; a conditional one draws from p(x | c), with c a class or a prompt. The five families differ mostly in network calls per sample and training signal. Fig. 1 makes the same Fashion-MNIST test pullover each way, then reads it back three ways. Each frame is the exact path a sampler follows when its model already knows the answer, not a trained model’s guess, so the lanes differ in the calls they need, not in quality (trained samples are on the child pages each step names).

  1. VAE: draw a code, decode it once. A random code z ~ N(0, I) (here 8 numbers of one seeded draw) goes through the decoder in 1 call. A VAE gives a lower bound on the probability of an image (the ELBO); its typical failure is blurry samples. Its samples and latent space on the running example: Autoencoders and VAEs, Fig. 2.
  2. GAN: one call, trained against a judge. A generator maps noise to an image in 1 call; in training only, a judge network D tries to tell its images from real ones. Sharp in one call, but no probability of an image, and prone to mode collapse.
  3. Autoregressive: one token per call. The pullover cut into 49 tokens of 4 × 4 pixels, revealed in raster order: 49 tokens, one call each, each waiting for the last and never revised. Chameleon spends 1,024 calls on one 512 × 512 image. A trained model writing a dress this way: Native multimodal, Fig. 3.
  4. Diffusion: remove a little noise per call. From one draw of pure Gaussian noise, DDIM takes 50 steps (timesteps 980, 960, ..., 0 on DDPM’s linear schedule), one call each. The frame is xt = √āt x0 + √(1 − āt) ε: after 25 of the 50 calls it is still only 8% image by variance, and the image arrives in the last steps. The same walk with a trained toy model: Diffusion from zero, Fig. 1.
  5. Flow matching: straight steps. The same noise, 8 Euler steps along the straight line xt = (1 − t) x0 + t ε: after 4 of the 8 calls the frame is already half image (50% by variance). Diffusion curves, flow goes straight, and a straight path survives larger steps (section 3; Flow matching, Fig. 1).
  6. Count the calls. The same image, five bills: 1, 1, 49, 50 and 8 sequential network calls. With classifier-free guidance (2 calls per step) the last three double to 98, 100 and 16, though a step’s two passes run as one batch.
  7. Read it: a vision encoder. A vision transformer cuts the image into square patches and turns each into one vector: the pullover in 4 × 4 patches is 49 tokens (a 224 × 224 image in patches of 16 is 196, section 5). Trained on captions (CLIP, SigLIP), the vectors land near the text that describes them, which gives zero-shot classification. One image becoming tokens: Vision encoders, Fig. 2.
  8. A vision-language model. A connector maps the patch vectors to a language model’s width; the language model reads them as image tokens beside the prompt and answers in text. One image costs 576 tokens in LLaVA-1.5 and 1,088 in SmolVLM-500M (section 6). Five connectors on one photo: Vision-language models, Fig. 2.
  9. A native multimodal model. Text and image tokens go into one transformer that writes both: Chameleon writes an image as 1,024 tokens from a codebook of 8,192, one call each, as in step 3 (section 7). One request, two designs: Native multimodal, Fig. 1.
  10. The whole map. Five ways to generate, three to read. Today’s image and video generators are steps 4 and 5 run inside a latent (section 2) with a text encoder in front (section 4); readers are steps 7 and 8; step 9 does both in one model.
Predict, then watch Fig. 1: a 512 × 512 image as Chameleon tokens (1,024 per image) or as 30 steps of a diffusion sampler with guidance. Which needs more sequential network calls?
FamilyHow it makes one sampleNetwork calls per sampleGives the probability of an image?Typical failureWhere it is in 2026
VAEDraw a random code, decode it once1A lower bound (the ELBO)Blurry samplesThe compressor in front of almost every image and video generator
GANA generator maps noise to an image; trained against a judge network1NoMode collapse (a few kinds of output only), unstable trainingRarely alone; its adversarial loss sharpens VAE decoders and few-step distilled samplers
AutoregressiveCut the image into discrete tokens, predict one token at a timeOne per token (1,024 for one 512 × 512 image in Chameleon)Yes, exactlySlow; detail limited by the tokenizerAudio, unified text-and-image models
DiffusionStart from pure noise, remove a little noise per stepTens of steps, twice that with guidanceA bound, or exactly through an ODESlow sampling; over-saturated images at high guidanceMost image and video generators up to 2024
Flow matchingFollow a learned velocity from noise to data along near-straight pathsFewer steps; 1 to 4 when distilledExactly through an ODEAs diffusion (it is the same family)Stable Diffusion 3, FLUX.1, Movie Gen

Autoregressive: p(x) = ∏ p(xi | x<i), a language model’s chain rule; on raw pixels the samples were poor (Gated PixelCNN: FID 65.93 on CIFAR-10, DDPM Table 1), on learned image tokens far better (Parti treats text-to-image “as a sequence-to-sequence modeling problem” at 20B parameters, Yu et al. 2022). VAE (Kingma and Welling, Dec 2013): section 2. GAN (Goodfellow et al., June 2014): a generator and a discriminator, “the training procedure for G is to maximize the probability of D making a mistake”; sharp in one call, no likelihood, and mode collapse (a few outputs that fool the judge); no child page teaches GANs, because in 2026 they survive only as a loss inside other models. Diffusion (Ho et al., June 2020) reached FID 3.17 on CIFAR-10, the best unconditional score in its table (DDPM page). Flow matching: Lipman et al. 2022; rectified flow, Liu et al. 2022. Section 3 compares the last two.

Understanding, not generating. A vision encoder turns an image into vectors (ViT, CLIP, SigLIP). A vision-language model (VLM) feeds those vectors to a language model, which answers in text. A native multimodal model puts text and image tokens into one transformer, which can read and write both.

Every named model on a timeline by family: Model map. Why each family’s loss is what it is: Variational inference and generative-model maths, sections 1 to 6 and derivations D1 to D8.

2. Latents: generate something smaller than the image

A 512 × 512 colour image is 786,432 numbers; Stable Diffusion v1 generates a 64 × 64 × 4 latent instead, 16,384 numbers, 48 times fewer derived, and the denoiser pays for every number at every step. An autoencoder makes the latent: an encoder squeezes the image, a decoder rebuilds it, trained on the difference. Three kinds matter, and they differ in what you can do with the code:

KindThe codeCan you sample a new image from it?Used by
Plain autoencoderAny vector the training put thereNo: a random code falls in a gap and decodes to nonsenseCompression only
VAEA distribution pulled towards a standard Gaussian by a KL penaltyYes, but blurry: the decoder averages what the code cannot pin downThe compressor of latent diffusion (with the KL weight near zero)
VQ-VAE and its successorsThe nearest entries of a learned codebook: a grid of integersYes, with a second model that predicts the integers like wordsAutoregressive and native multimodal models

The autoencoder of a latent diffusion model is a compressor, not a generator: Stable Diffusion’s weights its KL term at about 10−6 and adds perceptual and adversarial losses for sharp texture, and its latents are rescaled by a scaling factor (0.18215 for Stable Diffusion v1, 0.3611 for FLUX’s 16 channels) so the denoiser sees unit-scale numbers.

Go deeper: Autoencoders and VAEs trains all three on the running example (random codes, β, posterior collapse, codebook collapse, FSQ and LFQ, sections 1 to 10) and measures the Stable Diffusion autoencoder and every scaling factor (section 11). Drawn there: Fig. 1, one image through three bottlenecks; Fig. 2, the plain and VAE latent spaces; Fig. 5, a codebook.

3. Diffusion and flow matching, side by side

Diffusion. Mix an image with Gaussian noise in closed form, xt = √āt x0 + √(1 − āt) ε, train a denoiser to predict the noise from xt with a squared error, and generate by starting from pure noise and removing the predicted noise a little per step; the rule per step is the sampler. Flow matching. Draw the straight line from an image to a noise sample, xt = (1 − t) x0 + t ε, train the network to predict its direction ε − x0 (the velocity), and generate by stepping against the predicted velocity with an ODE solver. Classifier-free guidance works the same in both: run the network with and without the prompt and push past the difference, ε = εuncond + w (εcond − εuncond), which doubles the passes per step.

Diffusion (DDPM-style)Flow matching (rectified flow)
Path from data to noiseVariance-preserving curve set by the scheduleStraight line
Network predictsNoise (or clean image, or v)Velocity ε − x0
SamplingDDPM (stochastic, many steps), DDIM or solvers (10 to 50)ODE solver, usually Euler; few steps; 1 to 4 when distilled
GuidanceCFGCFG, or guidance distilled into the model
Used byDDPM, Stable Diffusion 1 and 2, SDXL, ImagenStable Diffusion 3, FLUX.1, Movie Gen
OwnerDiffusion from zeroFlow matching

They are one family. Flow matching “is compatible with a general family of Gaussian probability paths”, “which subsumes existing diffusion paths as specific instances” (Lipman et al. 2022), and a trained diffusion model also defines an ODE, the probability-flow ODE that DDIM and the solvers integrate (Song et al. 2021). So the choice is the path, the prediction target and how training weights the noise levels; straighter paths survive larger steps. On the topic’s tiny model, same network, data and training steps, flow with Euler scored FD 158.3 at 4 steps against DDIM’s 478.9 and beat every diffusion sampler from 1 to 50 steps, yet DDPM at 1,000 steps (34.9) still beat any unguided flow sampler measured: fewer steps, not a better end point. Cutting to 1 to 4 steps is distillation, owned by Latent diffusion and DiTs section 10 (reflow and one-step distillation of a flow: Flow matching sections 8 and 9).

Go deeper: Diffusion from zero (forward process and schedules, targets and loss weighting, samplers, guidance and its fixes: sections 1 to 6); Flow matching (the marginal field, solvers at equal cost, paths, couplings, reflow, flow against diffusion at equal cost: sections 1 to 10); the derivations on Variational inference and generative-model maths, derivations D3 to D8. Drawn there: diffusion’s forward and reverse walk, Diffusion from zero, Fig. 1, and five samplers on the same noise, Fig. 4; flow’s paths in space-time, Flow matching, Fig. 1, and Euler steps on the exact field, Fig. 3.

4. A text-to-image system: three networks in a row

Stable Diffusion v1.5, the cleanest example, is three networks in a row. Latent diffusion and DiTs, Fig. 1 draws this same pipeline in 3D with the time each part takes; the numbers:

NetworkWhat it doesParameters, countedRuns
Text encoderPrompt to 77 token vectors (frozen CLIP ViT-L/14 text tower)123,060,480Once (twice with guidance)
DenoiserRuns once per step on the 64 × 64 × 4 latent, reading the text through cross-attention (U-Net)859,520,964Once per step, twice with guidance
VAE decoderLatent to 512 × 512 pixels (f = 8, 4 channels, scale 0.18215)83,653,863Once

Parameters counted from the pinned weights measured, matching the CompVis README’s “860M UNet and 123M text encoder”; 77 tokens is the context length of CLIP’s tokenizer.

What one image costs. Text encoder once (twice with guidance, for the empty prompt), denoiser once per step and twice with guidance, decoder once. With 50 steps and guidance that is 100 denoiser passes against one decode, so the denoiser is almost the whole bill and steps × (1 or 2) is the number to cut. Measured: Stable Diffusion v1.5, 512 × 512, 25 guided DPM-Solver steps, fp16 with attention slicing: 15.75 s warm, 0.610 s per guided step against 0.319 s for one pass, decode 0.488 s, text encoder 0.025 s, peak 4,452 MiB measured on Apple M1 Pro. A datacenter GPU is many times faster per pass; the pass count is the same.

Since 2022 the denoiser became a transformer over latent patches (DiT: more compute per step “consistently” lowered FID, to 2.27 on ImageNet 256 × 256, Peebles and Xie, Dec 2022), text and image tokens moved into one attention (MMDiT in Stable Diffusion 3, Esser et al. 2024; double and single stream blocks in FLUX.1, “a 12 billion parameter rectified flow transformer”, model card), and the text encoder grew from CLIP to T5 and to whole language models, because a larger text encoder “boosts both sample fidelity and image-text alignment” more than a larger denoiser (Imagen, Saharia et al. 2022).

Go deeper: Latent diffusion and DiTs (why latents in FLOPs, the U-Net from its config, text encoders and cross-attention, DiT and adaLN-Zero, MMDiT, double and single stream, positions, resolution, cost and distillation, with eleven real denoisers counted); the LDM paper on the LDM page; every generator with its size and licence in the Model map.

5. Vision encoders: how a model sees

A Vision Transformer cuts the image into square patches, maps each to a vector with one learned matrix and adds a position vector: a 224 × 224 image in patches of 16 is 14 × 14 = 196 tokens derived, and from then on the image is a sequence like a sentence (ViT page). What the encoder learns depends on its training signal: labels, the pixels themselves (MAE, DINO), or captions. Caption training is what links images to words: CLIP scores every image against every caption in a batch with a softmax (Radford et al., Feb 2021); SigLIP scores each pair on its own with a sigmoid, so it needs no batch-wide sum and shards more cheaply (Zhai et al. 2023). The shared space gives zero-shot classification: write one sentence per class and pick the nearest. On the 10,000 Fashion-MNIST test images CLIP B/32 reaches 66.7% at best and SigLIP 2 74.5% (chance 10%); a linear probe on 16 labelled images per class reaches 79.0% and 84.0%; SigLIP 2 drops to about 22% if class names keep their capitals measured (Zero-shot lab). The embedding keeps what helps match captions and loses much else: a written word can override the object, and counting, left and right and attribute binding are close to guesses.

Go deeper: Vision encoders (patches and tokens, positions at new resolutions, registers, the CLIP and SigLIP losses on a real similarity matrix, training without captions, the typographic attack and minimal pairs, choosing an encoder); the prompt study behind the numbers above: Zero-shot lab; InfoNCE in general: Contrastive and self-supervised learning. Drawn there: one image becoming tokens, Vision encoders, Fig. 2, and a real batch of 8 pairs with its contrastive loss, Fig. 5.

6. Vision-language models: a language model that reads image tokens

The pipeline: an image (pixels, maybe tiled into crops) goes through a vision encoder (a CLIP or SigLIP ViT, one vector per patch), a connector merges and maps the vectors into the language model’s space (linear or MLP; optional token merging), and the language model reads image tokens and text and writes text. Vision-language models, Fig. 1 runs one photo through two VLMs, measured; Fig. 2 shows five connectors and Fig. 3 tiles against native resolution.

Most open VLMs follow LLaVA (Liu et al., Apr 2023): the projected patch vectors replace a placeholder in the prompt and are attended to like words; the alternative, cross-attention from a frozen language model to the image (Flamingo), keeps images out of the context. An image costs tokens: LLaVA-1.5’s CLIP ViT-L/14 at 336 pixels gives (336 / 14)2 = 576 derived; SmolVLM-500M gives 1,088 for any square image (16 tiles plus one whole view, 64 tokens each after a pixel shuffle) measured (VLM lab). More tokens read smaller text and cost context and time quadratically, which is why models tile, run at native resolution or merge neighbouring patches. Training aligns the connector first with the rest frozen, then tunes more of the model on conversations about images; the signature failure is object hallucination, naming what is not there because the language model’s habits outvote weak visual evidence.

Go deeper: Vision-language models (five connectors, tiles against native resolution, legibility, grounding, video, training stages, hallucination, token cost and serving, on SmolVLM and Qwen3.5); SmolVLM measured end to end, its answers and its time per image: VLM lab; VLM benchmarks on Long-context and multimodal benchmarks; VLMs reading documents on Document ingestion and multimodal retrieval.

7. Native multimodal models: one transformer for both

A VLM reads images but writes only text. A native (or unified) model reads and writes both with one network, and the published designs differ in how an image is written:

DesignImage out asExampleTrade
Everything is a token (early fusion)Discrete codebook tokens, next-token predictionChameleon: 1,024 tokens per 512 × 512 image from a codebook of 8,192, 7B and 34B (Chameleon Team, May 2024)One loss and one serving stack; slow (one call per token) and capped by the tokenizer
Two encodings, one transformerSeparate pathways to read and to writeJanus “decouple[s] visual encoding into separate pathways” (Wu et al., Oct 2024)Reading and writing want different features
Two objectives, one transformerContinuous latent patches, diffusion lossTransfusion: next-token loss on text plus diffusion on images, up to 7B on 2T tokens (Zhou et al., Aug 2024)Better images per FLOP; two losses and two samplers

The closed frontier publishes little: OpenAI’s card says only that “4o image generation is an autoregressive model natively embedded within ChatGPT” (OpenAI, 25 March 2025, archived) vendor. The traffic also runs the other way: diffusion now generates text (DiffusionGemma Technical Report).

Go deeper: Native multimodal and any-to-any models (early against late fusion, the two kinds of image token, autoregressive against diffusion at equal compute, the unified models and their attention masks, speech in and out, native against pipeline); drawn there: one request through early and late fusion, Fig. 1, and the two kinds of image token, Fig. 2.

8. Video and audio: the same four moves

Video is latent diffusion or flow with a time axis: a causal VAE compresses space and time, and a transformer denoises space-time patches (Sora is “trained on and subsequently generates videos within this compressed latent space”, OpenAI, Feb 2024, archived vendor; Movie Gen is a 30B-parameter transformer trained with flow matching, Polyak et al. 2024). Attention grows with the square of the patch count, so duration is the expensive axis, and the hard failures are temporal: identities that change and objects that vanish between frames. Audio takes two routes: a neural audio codec turns the waveform into parallel streams of discrete tokens that a language model predicts (AudioLM, MusicGen), or diffusion and flow generate a continuous latent or spectrogram (Stable Audio, flow-matching speech).

Go deeper: Video and audio generation: its hero, “Same four moves for both media: compress, cut into tokens, generate, decode”, and its section 3 on conditioning (each condition “enters at a different place in the sequence: text through attention, an image as latent frame 0, sound as a second stream aligned in time”), then attention across time, clip cost, codecs and residual vector quantisation, codec language models and flow TTS. Drawn there: one clip from frames to tokens, Fig. 1; where text, a first frame and sound enter, Fig. 3; EnCodec’s residual vector quantisation stage by stage, Fig. 4.

9. Evaluation: five questions, five kinds of number

No single number judges a generator. Each family of metrics answers one question and has one trap you must check before trusting it:

QuestionMetricsThe trapOwner
Do the samples look like the data, and cover it?FID, KID, precision and recall, FD-DINOv2, CMMDFID falls with the sample count even for real against real; resizing, compression and the reference set move itEvaluating, sections 2 to 5
Did it draw what the prompt asked?CLIPScore; question-based checks (TIFA, DSG, VQAScore); GenEvalCLIP cannot count or check relations, so a wrong image can score as close to its promptEvaluating, section 6
Do people prefer it?Pairwise arenas, reward models (PickScore, HPS, ImageReward)Style, self-selected prompts, vendors testing private variantsEvaluating, section 7; Human preference and arenas
Does a VLM see the image?Benchmarks with answer keys (MMMU, ChartQA, DocVQA), POPE for absent objectsMany questions are answerable without the image: report a text-only baselineEvaluating, section 8; Long-context and multimodal benchmarks
Video and audio?FVD, FAD and per-dimension suitesThe same recipe with other feature extractors, and their blind spotsEvaluating, section 9

FID (Heusel et al. 2017) passes real and generated images through Inception-v3, fits a Gaussian to each set of 2,048-number features and reports the distance between the Gaussians; lower is better, and it punishes both bad images and too little variety. The trap in the first row is easy to see on the running example: real training images against the real test images, nothing wrong, still score FID 2.538 at 10,000 images and 44.9 at 250 measured, so compare only at equal counts. The kind of failure a global similarity misses: Stable Diffusion v1.5 asked for “an astronaut riding a horse on the moon” drew the astronaut on the moon and no horse measured (setup smoke test, seed 5).

Go deeper: Evaluating generative models (FID from zero, its sample-count bias at six counts, KID, FD-DINOv2, CMMD, preprocessing pitfalls, prompt alignment, preference, VLM benchmarks, FVD and FAD); grading methodology in general on Topic: evaluation-and-llm-judges. Drawn there: the two feature clouds behind one FID, Fig. 1, and FID at six sample counts, Fig. 2.

10. Choosing, and what an image costs

JobDefault choice in 2026Why, and the trade
Text-to-image, best qualityLatent flow or diffusion transformer, 20 to 50 steps with guidanceBest published quality; the bill is steps × 2 denoiser calls
Text-to-image, interactive (under 1 s)The same model distilled to 1 to 4 steps10 to 50 times fewer calls; some loss of variety and detail
Generate and edit images inside a chatNative multimodal model, or an LLM driving a generatorOne context for text and image; native designs are mostly closed or young
Answer questions about images or documentsVLM: SigLIP-class encoder, projector, LLM, tiling for high resolutionAccuracy grows with image tokens; so do latency and context
Classify or search images with textCLIP or SigLIP embeddings, zero-shotNo training; weak on counts, relations and fine detail
Speech, music, soundCodec tokens with a language model, or latent diffusionTokens suit long structure and streaming; diffusion suits fixed-length clips
A probability for each sample (compression, anomaly scores)Autoregressive model or VAEExact likelihood or a bound; diffusion needs an ODE solve for it

Defaults follow from sections 1 to 8 and their sources; which named model fits each job, with its licence, is in the Model map.

What one image costs

Counts follow from the pipeline of section 4; only the seconds need a measurement. Predict first: how many times cheaper is 4 steps without guidance than 50 with it? Then set the controls in Fig. 2. The denoiser runs on the latent: a U-Net on its grid, a DiT on its patches.

Go deeper: FLOPs per pass for eleven real denoisers at any size: Latent diffusion and DiTs (Tokens and FLOPs calculator); the video case, where duration dominates: Video and audio generation section 4; serving costs in general on Topic: inference-and-serving.

Fig. 2 · Steps and guidance set the bill: count the passes for one image

Depth: mistakes that cross pages, two design questions

Mistakes that cross pages (one line each, with the page that shows it)
  • Counting steps instead of passes. Guidance doubles the passes per step and some solvers make two per step (Heun’s method, as in EDM): compare samplers and models by passes and by time on the same hardware, not by the step count in a config (section 10).
  • Decoding with the wrong latent scale. Every autoencoder has its own scaling factor and the pinned Stable Diffusion v1.5 vae/config.json has no scaling_factor entry, so diffusers falls back to its class default: Autoencoders and VAEs section 11.
  • Mixing up the two guidance-scale conventions, and a scheduler that does not match how the model was trained (prediction target, direction of time, schedule): Diffusion from zero sections 5, 6 and 8; for flows, Flow matching section 14.
  • Comparing FIDs computed at different sample counts or with different code, and reading CLIPScore as image quality: Evaluating generative models sections 3, 5 and 6.
  • Judging a VLM by its captions, and shrinking the image until its text is unreadable: Vision-language models sections 3 and 7.

The facts kept here from the labs retired on 2026-10-24 now live on their owners: a CNN’s inductive bias, raw cosines across models, the temperature’s two limits and the CAT sticker on Vision encoders (sections 1, 4 and 6); Flamingo-80B on Vision-language models (section 1); flow training time and diffusers’ shift formula on Flow matching (sections 1 and 11); DPM-Solver++ 2M as the diffusers default on Diffusion from zero (section 5); the VQ-VAE token map’s codes on Autoencoders and VAEs (section 8); the FID-bias toy on Evaluating generative models (section 3).

Design: a text-to-image system that returns an image in under 1 second.
Budget the passes: time one denoiser pass at the target resolution on the target GPU and multiply. 50 steps with guidance is 100 passes, so unless a pass takes under 10 ms it cannot meet 1 s, before the text encoder and decoder. Use a model distilled to 1 to 4 steps with guidance folded in (adversarial or consistency distillation), bf16 or fp8 weights, a compiled graph, the text encoder output cached for repeated prompts, and a fast decoder (or a tiny distilled decoder for previews). Generate at 512 to 768 and upscale if needed; batch requests per GPU; keep a few-step preview then refine path for quality. Measure the latency distribution, and check quality against the slow model with preference tests, because distillation loses variety.
Design: a multimodal LLM should also generate images. Autoregressive tokens or diffusion?
Discrete tokens reuse the language-model stack, loss and serving (Chameleon, and, per its system card, GPT-4o image generation), but cost one pass per token and lose detail in the tokenizer. Diffusion or flow on continuous latents gives better images per FLOP and runs in tens of passes, but needs a second objective and sampler (Transfusion puts both in one transformer; others attach a separate diffusion decoder). Choose by what you must share (one context, editing in conversation), the latency budget and the quality bar.

Child pages

In reading order. Each owns its subject in depth, with its own measured examples; times are each page’s own header (core reading, plus closed details).

Autoencoders and VAEs: latents and image tokenizersSection 2. The autoencoder, the VAE and its loss in working form, β and posterior collapse, VQ-VAE, FSQ and LFQ, tokens per image, the autoencoders inside latent diffusion and their scaling factors, evaluating a tokenizer.40 min, plus 17 in closed details
Diffusion from zero: DDPM, samplers and guidanceSection 3. The forward process and schedules, what the denoiser predicts and how the loss weights each noise level, samplers from 1 to 1,000 steps, guidance and its fixes, what goes wrong, on the tiny model and Stable Diffusion 1.5.43 min, plus 20 in closed details
Flow matching and rectified flowSection 3. What the regression really learns (exact on a 2-D toy), solvers and step grids at equal cost, paths, couplings, reflow, one-step distillation, timestep sampling and the resolution shift, stochastic sampling, production configs.43 min, plus 17 in closed details
Latent diffusion and diffusion transformersSection 4. Why latents in FLOPs, the U-Net, text encoders and cross-attention, DiT and adaLN-Zero, MMDiT, double and single stream, positions, resolution, the cost of an image and few-step distillation, with eleven real denoisers counted.39 min, plus 15 in closed details
Vision encoders: ViT, CLIP and SigLIPSection 5. Pixels to tokens, positions at new resolutions, registers, the CLIP and SigLIP losses on a real similarity matrix, training without captions, what each encoder is good and bad at, choosing one.34 min, plus 11 in closed details
Vision-language models: how images become tokensSection 6. Five connectors, tiles against native resolution, legibility, grounding, video, training stages, hallucination, token cost and serving, on SmolVLM and Qwen3.5.33 min, plus 11 in closed details
Native multimodal and any-to-any modelsSection 7. Early against late fusion, discrete and continuous image tokens, autoregressive against diffusion at equal compute, the unified models, interleaved data, the closed systems, speech in and out, native against pipeline.38 min, plus 12 in closed details
Video and audio generationSection 8. Space-time latents, attention across time, conditioning, what a clip costs, long-video drift, spectrograms, codecs and residual vector quantisation, codec language models and flow speech, how both are evaluated.31 min, plus 17 in closed details
Evaluating generative models: FID, CLIPScore, preference and VLM benchmarksSection 9. FID from zero and its sample-count bias, KID, FD-DINOv2 and CMMD, pitfalls, prompt alignment, human preference and reward models, VLM benchmarks, FVD and FAD.27 min, plus 7 in closed details