Loom: Diffusion-Transformer for Interleaved Generation

Mingcheng Ye, Jiaming Liu, Yiren Song

TL;DR

Loom is a unified diffusion-transformer framework designed for interleaved text-image generation, capable of handling complex "N-to-M" multimodal tasks like step-by-step cooking recipes and drawing tutorials. By introducing a "plan-then-render" strategy and sparse historical frame sampling, Loom maintains exceptional long-horizon temporal coherence and semantic alignment. Along with the model architecture, the authors introduce a new 50K interleaved tutorial dataset, demonstrating massive performance gains over existing open-source baselines.

What Problem Does This Paper Address?

Most current unified generative models are restricted to single-turn, single-modality inputs—they either generate an image from a single text prompt or edit a single reference image in isolation. However, real-world applications often require reasoning over mixed-modality sequences where multiple images and text blocks alternate (e.g., generating a multi-step tutorial or composing a scene from several distinct visual references).

Existing open-source models struggle with these interleaved "N-to-M" tasks. They frequently suffer from semantic drift (where errors in early visual frames corrupt subsequent text generation) and struggle to maintain temporal consistency over long horizons. While proprietary models like GPT-4o show proficiency here, their closed-source nature limits research transparency and domain-specific customization. Loom bridges this gap by providing an open-source, highly controllable diffusion-transformer architecture optimized for sequential, multi-modal generation.

Examples of Loom's interleaved text-image generation capabilities, including procedural tutorials and multi-image composition.

Methods

Loom builds upon the Bagel backbone—a decoder-only transformer that integrates a Vision Transformer (ViT) encoder for multimodal understanding and a Variational Autoencoder (VAE) with rectified flow for image generation. Loom applies full-parameter fine-tuning to this backbone while introducing three key algorithmic innovations:

  1. Planning-First Strategy: Standard interleaved models alternate between text and image generation ($T_1 \rightarrow I_1 \rightarrow T_2 \dots$), which allows visual errors to propagate. Loom adopts a "plan-then-render" workflow inspired by Chain-of-Thought reasoning. It first generates the entire formatted textual plan ($\mathcal{P} = \{S_1, S_2, \dots, S_N\}$) in a single autoregressive pass. Once the plan is locked, it enters a deterministic rendering loop to generate the images sequentially without visual interference corrupting the text logic.
  2. Sparse Historical Frame Sampling: Instead of using a local sliding window that causes the model to overfit to recent frames, Loom samples a small, temporally diverse subset of frames from the entire history at evenly distributed intervals. This preserves both macro-structure awareness and micro-detail efficiency.
  3. Temporal Embeddings & Entity Tokens: Learnable time embeddings explicitly encode the relative position of each visual frame within the sequence. Additionally, learnable entity tokens (like ⟨model⟩ or ⟨garment⟩) act as semantic anchors, allowing precise, localized control over specific objects during compositional tasks without requiring manual spatial masks.
The training and inference architecture of Loom, highlighting the condition branch, generation branch, and noise-isolated attention mask.

Datasets

To train and evaluate Loom, the authors curated a high-fidelity 50K interleaved tutorial dataset divided into three categories:

  • Compositional Generation and Decomposition (11k): Paired bi-directional instructions for integrating entities into layouts or decomposing scenes into parts.
  • Style Transfer Pairs (12k): Triplets of (Content, Style, Output) created via a "de-stylization" pipeline to enforce content-structure disentanglement.
  • Sequential Procedural Tutorials (27k): Long-horizon sequences covering cooking (extracted from RecipeGen) and creative arts/painting (from iPad screen recordings), filtered strictly for valid logical progression.

For evaluation, the authors utilized the OmniContext benchmark to measure multi-image reasoning capabilities.

Key Insights and Ideas

  • Chain-of-Thought for Pixels: The "plan-then-render" approach proves that decoupling semantic planning from pixel synthesis is vital for multimodal stability. Generating the text first acts as a logical guardrail for the diffusion process.
  • The Power of Global, Sparse Context: In long-horizon generation, seeing a sparse representation of the entire past is far more valuable than seeing a dense representation of the immediate past. It prevents the model from forgetting the original goal.
  • Mask-Free Spatial Control: By pairing entity tokens with clean object isolation in the dataset, the model naturally learns spatially sparse gradient updates, achieving localized image editing without explicit mask annotations.

Key Results

  • Text-to-Interleaved Tasks: Loom substantially outperforms the open-source baseline Anole, achieving an average gain of 2.7 points on a 5-point scale across temporal and semantic metrics. It also shows a >50% relative improvement over the base Bagel model.
  • Image-to-Interleaved Tasks: Loom achieves a ~44% relative improvement over Bagel, balancing instruction adherence with faithful visual preservation, occasionally outperforming the proprietary Doubao model.
  • OmniContext Benchmark: Loom achieved an average score of 8.13, significantly outperforming OmniGen2 (6.97) and Echo-4o (8.09), approaching the performance of GPT-4o (8.75).
Ablation studies showing how removing time embeddings, stepwise prompts, or reference sampling degrades generation quality.

Limitations and Future Work

The authors note that Loom's performance is tightly coupled with the quality of the initial language plan. If the language-planning phase generates a logically flawed or physically impossible step-by-step description, the subsequent rendering loop will faithfully generate incorrect or nonsensical visual sequences. Future work will likely focus on integrating interactive user feedback loops during the planning phase to correct errors before rendering begins.

Summary updated

BibTeX
@inproceedings{ye2026loom,
  author = {Mingcheng Ye and Jiaming Liu and Yiren Song},
  title = {{Loom: Diffusion-Transformer for Interleaved Generation}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=VAmm1bClz7},
}
Figure