Audio in, an image out — with nothing hand-built in between except two mechanisms this part already built separately. Retrieval finds the right words; generation turns those words into a picture. Chain them, and you have a tiny multimodal assistant.
Pick an audio clip. It retrieves its nearest caption in the shared embedding space — exactly Chapter 1's mechanism — and that caption's identity selects which noise-conditioning sequence steers the reverse-diffusion process — exactly Chapter 2's mechanism.
Two stages, two chapters, one pipeline:
- — the text embedding of whichever caption audio retrieval selected, threaded into the denoiser exactly as in the diffusion chapter.
- — the same conditioned noise predictor from the diffusion chapter, now driven by the retrieved caption's embedding.
- , — the noisy diffusion state and current timestep, unchanged from that chapter's process.
- No new mechanism — just reused pieces
Nothing here is a new mechanism — it's the exact retrieval rule from audio embeddings, feeding the exact conditioning slot from text-conditioned diffusion.
- This is the general shape of multimodal systems
A working multimodal system is very often just two or three single-modality mechanisms, connected so one's output becomes the next one's input.
Three audio clips, the same shared starting noise, the same reverse-diffusion formula — and three completely different generated values, because retrieval routed each one to a different conditioning sequence before generation ever started.
Three audio inputs, run through the full pipeline:
- Dog barking routes to the dog caption and dog conditioning
Retrieval: "Audio: a dog barking" to "Caption: a dog running" — . Generation: the dog-conditioned noise sequence reverses the shared (same mechanism as Chapter 2's first-step check, ) all the way to a final value .
- Cat meowing routes to the cat caption and cat conditioning
Retrieval: "Audio: a cat meowing" to "Caption: a cat sleeping" — . Generation: the cat-conditioned noise sequence reverses the same (first step , per Chapter 2) to — a different destination from the same starting point.
- Bird chirping completes the set
Retrieval: "Audio: a bird chirping" to "Caption: a bird flying" — . Generation: the bird-conditioned noise sequence (read down to ), first step , reverses all the way to — a third distinct value, confirming all three retrieval-then-generation chains work independently and correctly.
Find the audio input whose full pipeline produces the largest generated value.
This is the actual shape of most real multimodal systems: not one enormous end-to-end model, but a handful of well-understood single-modality mechanisms — an embedding space here, a conditioned generator there — wired together so information flows from one to the next. Every piece in this pipeline was built, verified, and understood on its own first; the assembly is just plumbing. This closes Part XII — Multimodal, Continued. The next part turns to the modern LLM engineering toolkit: parameter-efficient fine-tuning, scaling laws, and the machinery behind deploying models at scale.