02.07

How image and video models generate

skillmaxingInference EngineeringHow image and video models generate
Visual lesson

How image and video models generate

Included with Pro · 4:48
Lessons · 1,132 words

A language model writes one token at a time and reuses everything it computed before. An image or video diffusion model does the opposite. It starts from pure random noise covering the entire output, then runs its network over all of it, removing a little noise each time, for somewhere between 20 and 50 steps. Every step processes the whole canvas again. There is no decode loop, no growing KV cache, and nothing to stream until the end.

That makes the serving problem different in kind. Language model decode waits on memory; diffusion waits on arithmetic. The questions that matter are how many steps, how many network passes per step, and how many tokens the canvas holds, because attention over those tokens grows with their square.

Pro

Continue reading

Pro unlocks every video lesson, the full notes, worked sizing and cost calculations, and runnable configs across the Inference Engineering course, from GPUs and kernels to quantization, speculative decoding, disaggregation and production autoscaling.

Unlock full access to
Python with AIInference EngineeringAI researchComplete system design
30% off with LAUNCH30first payment
Buy now
View all plans ·Already Pro? Sign in