TL;DR
MIGC (Multi-Instance Generation Controller) introduces a robust "divide-and-conquer" framework to solve the long-standing problem of attribute leakage and missing objects in multi-entity text-to-image synthesis. By decomposing the generation process into single-instance shading subtasks within Stable Diffusion's cross-attention layers, MIGC delivers precise control over object positions, attributes, and counts without sacrificing inference speed.
What Problem Does This Paper Address?
While large-scale text-to-image diffusion models excel at generating single objects, they notoriously struggle with Multi-Instance Generation (MIG)—creating multiple distinct objects with specific attributes at precise locations.
Standard architectures suffer from two primary issues:
- Textual Leakage: Text encoders like CLIP often blend attributes across multiple objects in a prompt (e.g., prompting "a blue cat and a green dog" might yield a green cat or a blue dog).
- Spatial Leakage: Standard cross-attention layers lack inherent positional awareness, causing nearby or identical objects to merge together or disappear entirely based on the initial random noise.
MIGC tackles these challenges by enforcing strict spatial and semantic boundaries during the generation process.
Methods
MIGC breaks the multi-instance generation problem down into three core steps: Divide, Conquer, and Combine, operating directly within the cross-attention layers of Stable Diffusion's UNet.
1. Divide
The complex multi-instance prompt is broken down into parallel, single-instance "shading" subtasks. Instead of modifying the entire UNet network, this decomposition happens solely within the cross-attention layers to maximize efficiency and maintain image harmony.
2. Conquer
To prevent instances from missing or merging, MIGC introduces an Enhancement Attention (EA) layer:
- Grounded Phrase Tokens: Bounding box coordinates are mapped to a Fourier embedding, processed via an MLP, and concatenated with the text tokens. This ensures that even identical objects (e.g., two cats) have distinct representations based on their locations.
- Trainable Cross-Attention: The EA layer uses these grounded tokens to calculate an enhanced shading feature map, strictly bounded by an instance mask to ensure it only impacts the designated region.
3. Combine
To assemble the final image, MIGC uses two components:
- Layout Attention: This layer uses custom attention masks to ensure that pixels within an instance region only attend to other pixels in the same instance region, completely eliminating attribute bleeding between objects.
- Shading Aggregation Controller (SAC): A module that dynamically fuses the background, the layout template, and the individual instance features using sequential intra- and inter-attention mechanisms.
Additionally, the authors introduce an Inhibition Loss during training to prevent objects from bleeding into the background or generating unwanted artifacts outside their bounding boxes.
Datasets
The authors evaluated MIGC across three distinct benchmarks:
- COCO-MIG (New): A benchmark introduced in this paper to explicitly test position, color, and quantity control simultaneously. It adapts 800 images from the COCO dataset, assigning specific color attributes to multiple instances across five complexity levels (2 to 6 instances per image).
- COCO-Position: A standard layout-to-image benchmark used to evaluate spatial accuracy.
- DrawBench: A challenging text-to-image benchmark used to test fine-grained attribute, position, and counting capabilities.
Key Insights and Ideas
- The Shading Analogy: The authors conceptualize cross-attention as a "shading" process (like coloring a sketch). Fusing separate shading layers mid-generation is far more effective and visually harmonious than trying to stitch together fully generated images at the pixel level.
- Targeted Intervention: MIGC is only deployed on the mid-layers ($8 \times 8$) and the lowest-resolution decoder layers ($16 \times 16$) of the UNet. Because these layers dictate the macro-layout and semantics of the image, this targeted approach keeps computational overhead incredibly low.
- Eliminating Spatial Confusion: By combining spatial Fourier embeddings directly with text tokens, the model treats "cat at position A" and "cat at position B" as entirely separate semantic entities, natively solving the object-merging problem.
Key Results
MIGC significantly outperforms existing state-of-the-art layout-to-image methods like GLIGEN and Box-Diffusion across all metrics.
- COCO-MIG Benchmark: MIGC achieved an Instance Success Rate of 58.43%, nearly doubling GLIGEN's 32.39%. It also led in mean Intersection over Union (mIoU) with 51.48% vs GLIGEN's 32.25%.
- DrawBench: MIGC achieved an astonishing 97.50% attribute success rate (compared to GLIGEN's 48.20%) and a 67.76% count success rate (compared to GLIGEN's 44.08%).
- Efficiency: MIGC maintains an inference speed of 15.61 seconds per image—remarkably close to vanilla Stable Diffusion (9.18s) and vastly faster than optimization-based alternatives like Box-Diffusion (44.17s).
Limitations and Future Work
MIGC's primary limitation is its dependency on the generative capabilities of the base model. If the pre-trained Stable Diffusion model inherently struggles to render a specific concept (for example, generating accurate text characters like "CVPR"), MIGC will correctly manage the color and position of the bounding box but fail to generate the correct underlying content.
In the future, the authors plan to expand MIGC's framework to better control complex interactive relationships and actions between generated instances.
Summary updated