Introduction
Modern text-to-image diffusion models have achieved remarkable visual fidelity, yet they often lack the fine-grained control required for complex scene composition. Users frequently encounter the "attribute binding problem," where characteristics intended for one object—such as color or texture—leak into another. Furthermore, existing spatial control methods are typically "single-track," supporting either bounding boxes or masks, but rarely a flexible combination of both.
InstanceDiffusion introduces a unified framework designed to provide precise, instance-level control. By allowing users to specify object locations and attributes through a mix of bounding boxes, masks, scribbles, and points, it significantly reduces information leakage and establishes a new state-of-the-art in layout accuracy.
The Challenges of Spatial Control
The authors identify two primary hurdles in current generative models. First is the attribute binding problem: in a prompt like "a red cat and a blue dog," models often struggle to maintain the correct color-object pairing, resulting in blended colors or swapped identities. Second is the lack of multi-modal spatial input. Most models are constrained to a single type of geometric prompt, making it difficult to handle complex scenes where some objects might be well-defined by a mask while others are better represented by a simple point or scribble.
Architectural Innovations
InstanceDiffusion transforms the standard UNet-based diffusion architecture through three key innovations:
1. UniFusion Block
The UniFusion block acts as a universal interface for spatial constraints. It projects various location formats—points, scribbles, boxes, and masks—into a unified feature space by representing them as sets of 2D points. This allows the model to process diverse inputs within a single mathematical framework. To prevent attribute bleeding, the block employs Instance-Masked Attention. This mechanism ensures that visual tokens associated with a specific instance only interact with their corresponding prompts, effectively isolating the "blue" attribute to the pixels assigned to the "dog" instance.
2. ScaleU Block
Inspired by the "FreeU" technique, the ScaleU block dynamically re-calibrates the main backbone and skip-connection features within the UNet. Using learnable, channel-wise scaling vectors, ScaleU helps the model respect high-frequency spatial constraints, such as the precise edges of a mask, without compromising the global aesthetic quality of the generated image.
3. Multi-instance Sampler (MIS)
The early stages of the denoising process are critical for establishing image layout. The Multi-instance Sampler (MIS) runs separate denoising operations for each instance during the first 10% of the inference steps. By allowing objects to "grow" independently before merging them into a single global latent for final refinement, MIS prevents instances from competing for the same spatial regions and further clarifies object boundaries.
Data Pipeline and Evaluation
To train InstanceDiffusion, the authors developed an automated pipeline to generate high-quality per-instance captions. They utilized RAM for tagging, Grounded-SAM for generating boxes and masks, and BLIP-V2 to create detailed descriptions for cropped object images. This pipeline was applied to 5 million images from a licensed dataset.
Evaluation was conducted on the COCO and LVIS datasets. LVIS is particularly challenging due to its long-tail distribution of over 1,200 classes and high density of small objects, providing a rigorous test for the model's robustness and precision.
Key Results and Performance
InstanceDiffusion demonstrates significant improvements over existing state-of-the-art models:
- Layout Accuracy: On the COCO dataset, the model outperformed GLIGEN by 20.4% AP$_{50}^{box}$ for box-based inputs and surpassed ControlNet by 25.4% IoU for mask-based inputs.
- Zero-Shot Robustness: On the LVIS dataset, InstanceDiffusion showed a +16.0 AP$_{50}$ improvement over previous methods, highlighting its ability to handle rare objects and crowded scenes.
- Human Preference: In user studies, InstanceDiffusion was preferred 80.3% of the time compared to GLIGEN, with participants specifically noting superior adherence to requested colors and textures.
- Flexible Editing: The framework naturally supports iterative editing, allowing users to add, move, or resize objects within an existing scene while preserving the rest of the image context.
Limitations and Future Work
While InstanceDiffusion represents a major step forward, challenges remain. The authors note a quality gap when generating very small background objects compared to large foreground subjects. Additionally, while color binding is largely resolved, complex texture binding (e.g., distinguishing between a "wooden" vs. "plastic" object) remains difficult to achieve with 100% consistency. Future research will likely explore refinements to the ScaleU mechanism to better capture these fine-grained textural details.
Summary updated