IFAdapter: Instance Feature Control for Grounded Text-to-Image Generation

Yinwei Wu, Xianpan Zhou, Bing Ma, Xuefeng Su, Kai Ma, Xinchao Wang · OpenReview

Abstract

While Text-to-Image (T2I) diffusion models excel at generating visually appealing images of individual instances, they struggle to accurately position and control the features generation of multiple instances. The Layout-to-Image (L2I) task was introduced to address the positioning challenges by incorporating bounding boxes as spatial control signals, but it still falls short in generating precise instance features. In response, we propose the Instance Feature Generation (IFG) task, which aims to ensure both positional accuracy and feature fidelity in generated instances. To address the IFG task, we introduce the Instance Feature Adapter (IFAdapter). The IFAdapter enhances feature depiction by incorporating additional appearance tokens and utilizing an Instance Semantic Map to align instance-level features with spatial locations. The IFAdapter guides the diffusion process as a plug-and-play module, making it adaptable to various community models. For evaluation, we contribute an IFG benchmark and develop a verification pipeline to objectively compare models' abilities to generate instances with accurate positioning and features. Experimental results demonstrate that IFAdapter outperforms other models in both quantitative and qualitative evaluations.

Introduction

Modern diffusion models have revolutionized text-to-image generation, yet they frequently struggle with complex scenes containing multiple specific objects. These failures typically manifest as spatial confusion—where objects are placed in the wrong locations—and attribute leakage, where features like colors or patterns are incorrectly assigned or blended between instances (e.g., a "man in a red shirt" and a "woman in a blue dress" might result in swapped colors).

While existing Layout-to-Image (L2I) methods utilize bounding boxes to manage spatial positioning, they often rely on simple category labels, failing to capture the nuance of detailed descriptions. We define this more rigorous challenge as the Instance Feature Generation (IFG) task. To solve it, we present IFAdapter, a lightweight, plug-and-play module designed to ensure both positional accuracy and high-fidelity feature depiction without requiring retraining of the base diffusion model.

Methodology

The IFAdapter architecture is built upon two primary innovations designed to overcome the limitations of standard CLIP-based text encoding:

  1. Appearance Tokens: Standard models often rely on the "End of Text" (EoT) token, which captures global semantics but loses fine-grained detail. IFAdapter employs a Perceiver-style Resampler that uses learnable queries to extract high-frequency, detailed information from text descriptions into a set of dedicated appearance tokens.
  2. Instance Semantic Map (ISM): Rather than treating layouts as simple coordinate sequences, IFAdapter constructs a 2D spatial map. It generates local feature maps for every instance, providing a strong spatial prior that prevents feature "bleeding" outside assigned boundaries.
  3. Gated Semantic Fusion: To handle overlapping bounding boxes, a trainable lightweight network predicts importance weights for instances. This allows the model to effectively manage depth and occlusion by deciding which object "owns" specific pixels.

As an adapter, IFAdapter can be integrated into various community-tuned models (e.g., anime or 3D styles) to provide immediate layout and feature control.

Experimental Setup

To train and evaluate IFAdapter, we utilized a robust data and verification pipeline:

  • Data: Training was conducted on COCO2014 and a 1-million image subset of LAION 5B. We used Grounding-DINO for object detection and state-of-the-art Vision Language Models (VLMs) like QWen and InternVL to generate highly detailed captions for individual instances.
  • COCO-IFG Benchmark: We introduced a new benchmark specifically designed to test fine-grained feature accuracy in multi-instance scenes.
  • VLM-based Verification: Traditional object detectors are insufficient for verifying complex attributes (e.g., "a chair with a yellow star"). We developed an automated pipeline using VLMs to objectively judge whether generated images match the intricate requirements of the prompts.

Results

IFAdapter was evaluated against state-of-the-art models including GLIGEN, Instance Diffusion, and MIGC.

Qualitative comparison of IFAdapter against baseline models for complex scene generation and attribute binding.

Quantitative Performance

On the COCO-IFG benchmark, IFAdapter achieved an Instance Feature Success (IFS) Rate of 79.7% (judged by QwenVL), significantly outperforming Instance Diffusion (69.6%) and MIGC (62.8%). It also demonstrated superior spatial accuracy, achieving an Average Precision (AP) of 49.0% for box placement, compared to 43.1% for the next best model.

Qualitative Analysis

Qualitative results highlight IFAdapter's ability to handle "stress tests," such as correctly binding specific colors to multiple cats and their respective hats—a task where baseline models frequently suffer from attribute leakage. Furthermore, the module's flexibility is demonstrated by its successful application across diverse artistic styles, from claymation to anime-style models.

Conclusion

IFAdapter effectively addresses the attribute leakage and spatial grounding issues prevalent in current T2I models. By utilizing Appearance Tokens and Instance Semantic Maps, it provides a high-bandwidth channel for visual details and precise spatial control. While the model's performance is currently linked to the quality of the VLMs used for training data generation, it represents a significant step toward controllable, high-fidelity image synthesis. Future work will focus on narrowing the gap between VLM-based evaluation and human aesthetic judgment.

Summary updated

BibTeX
@misc{wu2024ifadapter,
  author = {Yinwei Wu and Xianpan Zhou and Bing Ma and Xuefeng Su and Kai Ma and Xinchao Wang},
  title = {{IFAdapter: Instance Feature Control for Grounded Text-to-Image Generation}},
  year = {2024},
  eprint = {2409.08240},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2409.08240},
}
Figure