ContextGen: Contextual Layout Anchoring for Identity-Consistent Multi-Instance Generation
Abstract
Multi-instance image generation (MIG) remains a significant challenge for modern diffusion models due to key limitations in achieving precise control over object layout and preserving the identity of multiple distinct subjects. To address these limitations, we introduce **ContextGen**, a novel Diffusion Transformer framework for multi-instance generation that is guided by both layout and reference images. Our approach integrates two key technical contributions: a **Contextual Layout Anchoring (CLA)** mechanism that incorporates the composite layout image into the generation context to robustly anchor the objects in their desired positions, and **Identity Consistency Attention (ICA)**, an innovative attention mechanism that leverages contextual reference images to ensure the identity consistency of multiple instances. To address the absence of a large-scale, high-quality dataset for this task, we introduce **IMIG-100K**, the first dataset to provide detailed layout and identity annotations specifically designed for Multi-Instance Generation. Extensive experiments demonstrate that ContextGen sets a new state-of-the-art, outperforming existing methods especially in layout control and identity fidelity.
Cite
Text
Xu et al. "ContextGen: Contextual Layout Anchoring for Identity-Consistent Multi-Instance Generation." International Conference on Learning Representations, 2026.Markdown
[Xu et al. "ContextGen: Contextual Layout Anchoring for Identity-Consistent Multi-Instance Generation." International Conference on Learning Representations, 2026.](https://mlanthology.org/iclr/2026/xu2026iclr-contextgen/)BibTeX
@inproceedings{xu2026iclr-contextgen,
title = {{ContextGen: Contextual Layout Anchoring for Identity-Consistent Multi-Instance Generation}},
author = {Xu, Ruihang and Zhou, Dewei and Ma, Fan and Yang, Yi},
booktitle = {International Conference on Learning Representations},
year = {2026},
url = {https://mlanthology.org/iclr/2026/xu2026iclr-contextgen/}
}