Introduction
Subject-driven image generation aims to create new images of a specific subject (like a character or a person) based on a text prompt. While models like IP-Adapter and FastComposer have made significant strides, they often struggle with a phenomenon known as target leakage. Researchers from Baidu and the University of Pennsylvania have introduced RetriBooru, a novel dataset and training pipeline designed to mitigate this issue by decoupling identity and outfit concepts from specific image layouts.
The Challenge of Target Leakage
Target leakage occurs when a model is trained using the same image as both the reference (the source of the subject's identity) and the target (the ground truth for the output). This setup allows the model to take a "shortcut," learning to copy spatial information, lighting, and background from the reference image rather than understanding the abstract concepts of the subject's face or clothing. Consequently, at inference time, these models often fail to generate the subject in diverse poses or environments because they are over-fitted to the specific compositions seen during training.
The RetriBooru Dataset and Leakage-Free Training
To address this, the authors developed RetriBooru, a large-scale anime dataset derived from Danbooru containing 116,729 training samples. Unlike previous datasets, RetriBooru groups images not just by character identity, but by specific outfits. Using a Vision-Question Answering (VQA) model (Instruct-BLIP), the researchers clustered images of the same character wearing the same clothes.
This structure enables Leakage-Free Training (the "-b" setting). Instead of using the same image for reference and target, the model is trained using two different images of the same character in the same outfit. This forces the model to ignore non-essential details like pose or background and focus on the invariant features of the character's identity and attire.
RetriNet and Concept Composition
The proposed RetriNet architecture is a modified diffusion model based on ControlNet. It utilizes a retrieval encoder and cross-attention layers to inject specific concepts—such as a face or a set of clothes—into the U-Net decoder.
A key innovation is the Concept Composition Task. In this setting, the model must retrieve the "face" from one reference image and the "clothes" from another to generate a combined target image. This modular approach allows for high-quality character customization and outfit swapping without requiring geometric guides like facial keypoints during inference.
Evaluation and Results
The researchers introduced a new metric, Similarity Weighted Diversity (SWD), to ensure a balanced evaluation. Standard metrics often fail to capture whether a model is simultaneously preserving identity and following the text prompt; SWD weights the diversity (prompt adherence) by the similarity (identity preservation) for every generated image.
Key results include:
- Quantitative Performance: RetriNet and the "-b" training pipeline consistently outperformed state-of-the-art models like IP-Adapter in balancing identity preservation (CLIP-I) and text alignment (CLIP-T).
- Qualitative Quality: The model successfully demonstrates complex edits, such as changing backgrounds to "blue sky" or "night with a full moon," while maintaining the character's core features.
- Generalization: While trained on anime, the principles of unfreezing the encoder and using distinct reference/target pairs were shown to generalize effectively to human face generation.
Conclusion
By identifying and solving the target leakage problem through the RetriBooru dataset and the RetriNet architecture, this research provides a more robust framework for subject-driven generation. The shift from simple image injection to semantic concept retrieval allows for greater creative control and better adherence to complex user prompts.
Summary updated