Interleaved image-text generation is the capability of a single model to produce one output sequence in which text passages and images alternate in a meaningful order, such as a recipe with a photo after each step or an illustrated story. In multimodal AI, it extends ordinary text-to-image generation from one prompt and one picture to documents where every image must stay consistent with the surrounding words and with the images that came before it.
The capability matters because real documents are rarely pure text or a single picture. Tutorials, product guides, children’s books and slide drafts all depend on tight coupling between narration and visuals. A model that generates interleaved content must decide when to switch modality, what each image should show, and how to keep characters, objects and style consistent across the whole sequence.
How interleaved image-text generation works
Interleaved image-text generation works by treating text and images as parts of one autoregressive sequence, so the model predicts the next element whether it is a word or a piece of an image. Text is split into ordinary subword tokens, while images are converted by an image tokenizer into discrete visual tokens or into continuous latent vectors that a decoder can turn back into pixels.
A special beginning-of-image marker signals the switch from writing to drawing. When the model emits that marker, it generates a fixed number of visual tokens or hands control to a diffusion decoder, then emits an end-of-image marker and continues writing. Because every element sits in the same context window, later text can refer to earlier images and later images can be conditioned on earlier text and pictures.
The architectures fall into a few families that differ in how images are represented and decoded. The table below summarizes the main design choices used in research and production systems.
| Approach | Image representation | Image decoder | Typical trade-off |
|---|---|---|---|
| Discrete-token autoregression | VQ codebook tokens | VQ decoder | Simple single objective, lower image fidelity |
| Language model plus diffusion | Continuous latent queries | Separate diffusion model | High image quality, two-stage training |
| Unified autoregression and diffusion | Continuous patches in one transformer | Diffusion inside the same network | Strong quality, complex training recipe |
| Tool-calling pipeline | Text prompts for an external generator | Independent image model | Easy to build, weak cross-image consistency |
In the early fusion design, one transformer processes both modalities from the first layer, which supports native multimodality. In pipeline designs, a language model writes image prompts that another model renders, which is easier to assemble but loses fine-grained visual memory between images.
Training data and objectives
Models learn this skill mainly from interleaved image-text data, meaning web pages, articles and documents in which images appear at their natural positions in the text. Plain image-text pair datasets teach the link between one caption and one picture, but they cannot teach document-level ordering or references across several images.
Training usually combines a next-token prediction loss on text with an image loss suited to the decoder: cross-entropy on visual tokens, or a denoising objective for diffusion-based heads. Balancing these losses is delicate, because an overweighted image loss can degrade language quality and vice versa. Most systems then apply instruction tuning on curated interleaved examples so that the model follows requests such as asking for a picture after each step.
| Data type | Example content | Main contribution |
|---|---|---|
| Image-text pairs | Captioned photos | Basic visual-semantic alignment |
| Interleaved web documents | Articles with embedded figures | Ordering and multi-image context |
| Video frames with transcripts | Narrated tutorials | Temporal and step-by-step consistency |
| Curated instruction sets | Illustrated how-to answers | Following user formatting requests |
How it differs from related multimodal tasks
Interleaved image-text generation differs from neighboring tasks because both the input and the output may contain several images and text spans in an arbitrary order. A vision-language model that only answers questions about images reads multimodal input but writes text only, while a text-to-image model writes no text at all.
| Task | Input | Output | Cross-image consistency needed |
|---|---|---|---|
| Visual question answering | Image and question | Text | No |
| Text-to-image generation | Text prompt | One image | No |
| Visual storytelling | Image sequence | Text story | Only in reading |
| Interleaved generation | Text and images | Mixed text and images | Yes, across the output |
| Any-to-any model output | Several modalities | Several modalities | Depends on the task |
It is best seen as a specific form of cross-modal generation with an added requirement of narrative and visual coherence. Many any-to-any models support it, but supporting both modalities does not guarantee good interleaving: the model must also learn when an image adds value.
Evaluating interleaved output
Evaluating interleaved output is hard because no single metric captures text quality, image quality and their coherence at once. Image fidelity scores such as FID and text-image similarity scores based on CLIP measure parts of the problem, but they ignore whether the fifth image still shows the same character as the first.
Current practice therefore combines automatic metrics with model-based judges and human rating. Benchmarks for this task typically score several dimensions separately, and their results should be read with care because automatic judges can share the biases of the systems they rate.
| Dimension | Question asked | Typical measurement |
|---|---|---|
| Text quality | Is the writing correct and fluent | Human rating or language model judge |
| Image quality | Is each image sharp and plausible | FID or human rating |
| Text-image alignment | Does each image match its passage | CLIP-based similarity |
| Cross-image consistency | Do subjects and style stay stable | Identity similarity or human rating |
| Placement helpfulness | Are images placed where they help | Human preference comparison |
Limitations and common failure modes
The most visible weakness is identity drift, in which a character, product or room changes appearance from one image to the next. Long sequences also strain the context window, because each image may consume hundreds or thousands of tokens, which limits how many pictures a model can keep in view.
- Modality imbalance: the model writes long text and rarely inserts images, or inserts images that add nothing.
- Text rendering errors: labels and numbers inside generated images are often misspelled.
- Multimodal hallucination: the text describes details that the generated image does not show.
- High inference cost: each image adds substantial latency compared with text tokens.
- Safety and provenance: mixed documents need content filtering and labeling for both modalities.
Practitioners mitigate these issues with reference-image conditioning, explicit style descriptions repeated in the prompt, and post-generation consistency checks. None of these fully removes drift in long outputs, so human review remains standard for published material.
A plain-language summary
Imagine asking a helper to write a cooking guide with a photo after each step. Some tools can write the text. Others can draw one picture. Interleaved image-text generation does both in one go. It writes a step, adds a matching picture, then writes the next step.
The hard part is keeping everything consistent. The same pan should look the same in every photo. The picture should match the words next to it. Good systems keep the whole document in mind, much like an illustrator who reads the full story before drawing each page.
An example from practice
A team that produces internal training material for a hardware store chain needs illustrated guides for tasks such as replacing a faucet cartridge. Previously, a writer drafted the text and a designer created six to eight drawings, which took several working days per guide.
The team now uses a model with interleaved image-text generation. The writer supplies the procedure, a reference image of the faucet model and a style instruction for flat technical drawings. The model returns a guide with seven steps, each followed by a matching illustration, keeping the same faucet design and color palette throughout.
A designer still reviews every image, fixes two drawings where a wrench appeared on the wrong side, and corrects a mislabeled part. The result is a first draft in under an hour and a finished guide within one day, while human review remains the final quality gate.