Skip to content

Diffusion and generative media

How diffusion models turn noise into an image, what every dial in a generation UI multiplies, and the arithmetic behind the GPU-seconds each picture costs.

Most explanations of image generation stop at the metaphor: the model starts with static and gradually removes the noise. That is true and it is not enough to reason with. It does not tell you why thirty steps beat ten but sixty barely beat thirty, why guidance costs exactly double, why a negative prompt does nothing when guidance is off, or why doubling the output resolution costs seven times the compute rather than four.

These pages work from the tensor outward. Each one takes a control you have actually turned — steps, CFG, strength, seed, mask, resolution — and says what it multiplies, what it costs, and where it stops working. Where the arithmetic can be done it is done on the page, with the assumptions numbered, so it stays true when the hardware changes.

Nothing here is a benchmark. Where a question is contested in the research literature it is described as contested, and where a number depends on your model and your GPU there is a script that measures it rather than a figure that would be wrong for you.

How Diffusion Models Generate an Image

Noise to image traced step by step: what the network actually predicts, what each step changes, and why composition is decided long before texture.

10 min read

The Denoising Schedule and the Step Count

Why generation time is exactly linear in steps, why quality is not, and a convergence harness that finds where your own model stops improving.

10 min read

Latent Diffusion: Why It Runs on a Laptop

The autoencoder that made high-resolution generation affordable, with the compression factor derived and the compute saving worked out term by term.

11 min read

CFG Scale Explained: What Classifier-Free Guidance Does

What the guidance scale multiplies, worked out at eight values, plus why it costs exactly a second forward pass and where high values start to break the image.

10 min read

Samplers: What DDIM, Euler and DPM++ Change

The ODE view of sampling first, then what each solver family actually does differently, and a selection rule that does not depend on a benchmark.

11 min read

Seeds, Determinism, and Reproducing an Image

What a seed actually fixes, the eleven other things that must also match, and why the same seed on a different GPU gives a different image.

10 min read

Negative Prompts and How They Work Mechanically

A negative prompt is not a filter. It replaces the empty string in guidance's second forward pass, which explains why it is free, why it scales with CFG, and why it does nothing at CFG 1.

9 min read

ControlNet, Depth Maps and Structural Conditioning

How a copied encoder with zero-initialised connections adds spatial control to a frozen model, and why the preprocessor is half the result.

11 min read

Inpainting and Outpainting: Masks Done Right

Why a mask edge is quantised to eight pixels, why a small mask in a large image is starved of capacity, and a script that produces your own before-and-after.

12 min read

Image-to-Image and Denoising Strength

Strength selects where in the noise schedule you enter, which means it silently changes your step count as well as how much of the original survives.

10 min read

LoRAs for Image Models: Style Without Retraining

Where the fifty megabytes come from, derived from rank and width, and why a low-rank update can teach a style but not a new capability.

11 min read

Why Image Models Struggle With Text and Hands

Four separate causes, one of which is arithmetic: a small glyph cannot survive an eightfold downsample no matter how good the diffusion model is.

11 min read

Aspect Ratio, Resolution and Training Buckets

Why sides must be multiples of 64, how to derive a bucket list from a pixel budget, and the mechanism behind the duplicated-subject failure.

10 min read

Upscaling: Interpolation, GANs and Diffusion Refiners

Three families of upscaler, what detail each one invents, and the two-orders-of-magnitude compute gap between them.

11 min read

How Video Models Keep Frames Consistent

Temporal attention, spatiotemporal latents, and the quadratic arithmetic that explains why generated clips are short.

11 min read

Music and Sound Generation Models

Why three minutes of audio is a harder tensor than a megapixel image, and the three representations — spectrogram, codec tokens, continuous latents — that make it tractable.

11 min read

3D Asset Generation

Meshes, SDFs, radiance fields and splats — what each representation can be generated from — and the seven steps between a generated asset and one an engine will accept.

12 min read

Content Credentials: How C2PA Actually Works

What a manifest contains, how the cryptographic binding works, what survives an edit, and why a screenshot destroys it — plus what an absent credential does not prove.

11 min read

Keeping a Character Consistent Across Generations

A ladder of five methods from free to expensive, and the bootstrapping loop that turns a few agreeing images into a dataset worth training on.

12 min read

The GPU-Seconds Behind One Generated Image

Steps, resolution and model size converted into FLOPs, then into GPU-seconds, cents and watt-hours, with every assumption numbered and a script to measure your own.

14 min read

Other topics