RetriBooru: Leakage-Free Retrieval of Conditions from Reference Images for Subject-Driven Generation

## Abstract

Abstract Diffusion-based methods have demonstrated remarkable capabilities in generating a diverse array of high-quality images, sparking interests for styled avatars, virtual try-on, and more. Previous methods use the same reference image as the target. An overlooked aspect is the leakage of the target’s spatial information, style, etc. from the reference, harming the generated diversity and causing shortcuts. However, this approach continues as widely available datasets usually consist of single images not grouped by identities, and it is expensive to recollect large-scale same-identity data. Moreover, existing metrics adopt decoupled evaluation on text alignment and identity preservation, which fail at distinguishing between balanced outputs and those that over-fit to one aspect.
In this paper, we propose a multi-level, same-identity dataset RetriBooru, which groups anime characters by both face and cloth identities. RetriBooru enables adopting reference images of the same character and outfits as the target, while keeping flexible gestures and actions. We benchmark previous methods on our dataset, and demonstrate the effectiveness of training with a reference image different from target (but same identity). We introduce a new concept composition task, where the conditioning encoder learns to retrieve different concepts from several reference images, and modify a baseline network RetriNet for the new task. Finally, we introduce a novel class of metrics named Similarity Weighted Diversity (SWD), to measure the overlooked diversity and better evaluate the alignment between similarity and diversity.

## 1 Introduction

Recent advancements in latent diffusion models (Rombach et al., ) have ushered in new capabilities in image generation, including face generation, virtual try-on, anime creation, etc. Previously, the focus was on optimization-based methods which involved tuning entire networks (Ruiz et al., ), tuning low-rank matrices (Hu et al., ), or incorporating text embeddings (Gal et al., ). Yet, they suffer from slow inference and their hyper-parameters do not generalize to all intended subjects. The latest research has shifted towards injecting specific subject information directly into the generation process, enhancing the relevance and accuracy of the output. Current methods can be categorized into two main approaches. The first approach, exemplified by IP-Adapter (Ye et al., ), integrates additional networks that do not specifically learn to comprehend reference images. The second approach, e.g. InstantID (Wang et al., ), adopts specialized inputs such as facial key-points, which while effective for maintaining facial identity, lacks versatility in other contexts like changing outfits. However, we observe a potential defect of the predominant training pipeline, which adopts the same image for both reference conditioning and target. This setup can inadvertently leak target information to the conditioning encoder during training, which could lead to shortcut learning, e.g., spatial information (Xue et al., ; Zhong et al., ). While this pipeline may aid in convergence and stabilize generation, it raises concerns about whether the model is learning the intended concepts or merely exploiting the leaked information. In this paper, we propose a shift from learning a passive condition encoder to a retrieval encoder, enabled by new annotations. This new task encourages the encoder to understand and actively retrieve subject concepts in the intended manner, without depending on non-characteristic target information.

Avoiding target leakage. To learn to retrieve the specified information and reduce leakage from the target, a good conditional image could be chosen to maximize the shared characteristic information we would like to learn, and minimize the unwanted information. For example, vision-language models are used to be challenged by distinguishing between Chihuahua and Muffins (Fan et al., ), partially due to their similar spatial structures (near-round shapes in brown with black dots), which are heavily exploited during pre-training. If the non-characteristic information was well permuted, e.g. hiding Chihuahua partially, closing Chihuahua eyes, cutting muffins, resulting in a diverse and less learnable spatial inductive bias, we could force the models to learn from characteristic information as intended, such as furs on Chihuahua faces and cake crumbs on muffins, as well as their dog paws and paper cups, respectively. Applying the same ideology to subject-driven generation, what if we can access to conditional images with different spatial information, activities etc. from the target, while maintaining the identity? In this sense, the conditional encoder is forced to learn from the definitive concepts and features of the identity. However, such identity-preserving annotations are scarce. For human appearance, current identity-focused datasets are either limited to faces, or feature inconsistent clothing options. Meanwhile, virtual try-on datasets provide detailed clothing labels but suffer from a lack of diversity in body poses and background settings (Sec. 2). It remains a significant challenge to keep track of whole-body human identities with unlimited motions and poses, accounting for both facial and clothing identities, where the later one can lead the classification at whole-body scale too.

Costs and generalization. Another practical consideration is the trade-off between computational costs and the generalization ability. For instance, InstantID (Wang et al., ) requires 48 NVIDIA H800 GPUs, with a batch size of only two, to train adapter structures for face generation with key-point features on their large, private dataset. Extending this to more general semantic features could significantly increase computational demands. Researchers, when validating prototype methods and primary results, demand a smaller and easier dataset, in order to obtain valuable feedback on the way to convergence. However, an easier benchmark would still require a decent ability to generalize, so that the observations and conclusions drawn can also apply to larger scale datasets and other domains. Taking both into consideration, anime figures data offers a valuable testing ground due to its easier details and good mimicry of human figures. It has less compressed latent space after VAE, which is less prone to degeneration at smaller resolutions compared to human faces and body parts. This allows for quicker iterations and faster algorithm development in anime styles, while fitting into tighter speed and memory constraints. On the other hand, anime figures are animated humans, whose samples share a large similarity in body structures, facial expressions, activities, etc. with human samples, facilitating human-related research. What is more, anime itself also serves as the medium of plenty artistic creations in books, movies and games, which have proven popular and successful for both commercial and recreational applications, sparking generative methods to create anime subjects.

Therefore, we propose RetriBooru, a multitask, multiconcept anime dataset based on [Danbooru](https://safebooru.donmai.us/), one of the largest anime website with higher-quality anime images and precise tags. More importantly, We propose a labeling pipeline by leveraging existing tags and VQA models to construct same-outfit clusters for anime characters (Sec. 3). This combination of data and annotation would be very costly to obtain otherwise. With annotated clothing identities, RetriBooru not only enables training with a different reference image of the same identity as target, but also empowers more advanced tasks such as composing faces and clothes so changing one’s outfits. In order to retrieve and inject desired information into the generation, we modify ControlNet (Zhang et al., ) to build a retrieval encoder, namely RetriNet (Fig. 4). Simultaneous work follow a similar design, achieving good results in other generation tasks with other geometric or layout control (Sec. 2). We take this one step further and let both appearance and geometric information be retrieved and injected.

Evaluating prompt-reference fusion. In evaluating the generation quality, common CLIP scores for image and text similarity also tend to encourage copying and pasting the reference subject and follow prompts elsewhere. This is not the ideal integration of reference images and text prompts. Even worse, in rare cases, if half of the generated images have high identity preservation but low text alignment, and vice versa for the other half, we obtain no useful pictures with high information from reference images and good prompt fidelity, or otherwise poorly combined, but still have decent CLIP-I and CLIP-T averages. We tackle this problem in Sec. 4, where we propose a class of metrics named Similarity Weighted Diversity to evaluate how well the prompts and reference images are combined. When used with different pairs of metrics, new metrics can measure the quality of simultaneous reference and prompt similarity, which we refer as similarity-diversity balance.

We summarize our contributions as follows: a) We propose an anime dataset RetriBooru and the generalizable construction pipeline, which enables tracking and clustering of annotated outfits of the same character, and facilitates experimenting methods on referenced generation. b) Given the clothing annotation, we propose a new training pipeline for subject-driven generation by using a reference image different from the target but with the same identity, and verify its effectiveness by previous methods. c) We propose a new concept composition task, which learns to retrieve specific aspect information or various concepts from different reference images, and provide baseline results with our baseline architecture RetriNet. d) We propose a new class of metrics (SWD) to better evaluate referenced generation methods, explain its theoretical meaning, and demonstrate its effectiveness in evaluation. We conduct major experiments on RetriBooru using various methods and settings, drawing intriguing conclusions that also generalize to other domains with a larger scale.

## 2 Related Work

Reference architectures. Initial approaches to inject information into the generation process apply to the attention blocks in the denoising U-Net. For example, in Prompt-to-Prompt (Hertz et al., ) and in Tune-A-Video (Wu et al., ), one can control the subject to ride a car instead of a bike while preserving the rest of the results. However, like in CustomDiffusion (Kumari et al., ), these methods are usually limited to more general concepts without as much geometric identity information as faces or clothes. IP-adapter (Ye et al., ) and FastComposer (Xiao et al., ), both aiming at subject face generation, do utilize image encoders, but with a shared feature vector for all blocks of the U-Net (as opposed to different vectors for different blocks in our RetriNet). MasaCtrl (Cao et al., ) adopts a parallel encoder with modified self-attention blocks so that the reference image is edited according to the new prompt. DreamTuner (Hua et al., ) tries to enhance referenced generation with an additional fine-tuning. StableVITON (Kim et al., ) adds body-related masks and segmentation for the virtual try-on application.

Virtual try-on. Starting from reproducing single objects (Chen et al., ; Li et al., ), tasks of combining multiple objects or people have emerged (Liu et al., ; Xiao et al., ; Kumari et al., ; Ma et al., ), including virtual try-on, where given images of a person and an outfit, a generated image of the person wearing the clothes seamlessly is expected. It is more difficult than other composition tasks since there are more interactions between the body and clothes (Zhu et al., ; Li et al., ; Institute for Intelligent Computing, ; Kim et al., ). A unique technical characteristic of virtual try-on is the fixed pose in the reference image as layout control, and only the appearance needs to be modified. For diffusion models, generating local appearances based on a given layout is much easier compared to generating geometry and appearance at the same time.

Evaluation metrics. Recent evaluation metrics are quite similar among the literature (Ruiz et al., ; Chen et al., ; Ruiz et al., ; Li et al., ; Kumari et al., ; Ma et al., ), using CLIP (Radford et al., ) or DINO (Caron et al., ) features to measure similarity. CLIP-I is used to measure the similarity between the reference image and the generated image. CLIP-T is used to measure the similarity between the prompt and the generated image. Besides human user preference tests, (Achlioptas et al., ) aims to improve similarity scores. Nevertheless, those metrics offer simple trade-off between one another and fail to evaluate many more subtle aspects for referenced generation. In Sec. 4, we propose a new class of metrics to ameliorate this situation.

## 3 RetriBooru Dataset

Figure: Figure 2: Details of RetriBooru dataset. Left: annotations of an individual sample. Right: distributions of lengths of the “similar” lists, top-15 characters with most appearances, and top-30 cloth tags.
Refer to caption: x2.png

As discussed in Sec. 1, a concepts-labeled dataset is required to train a referenced generation model for retrieving given concepts interpretably. The motivation is to minimize the use of leaked information of the target, when training on the same image as both the reference and the target, which can form potential training shortcuts and cause overfitting. Existing datasets are single-tasked, lacking in size and types of identity, and may be harder to iterate on than anime figures (faces, for example). With the further annotated RetriBooru dataset, one can not only utilize cloth tags to constrain customization, apply masks and face boxes to refine details, but also leverage reference image(s) to serve as conditioning and train a more generalizable, robust condition encoder.

**Table 1: Comparisons with datasets used in other literature.**
| Dataset | Size | Category | Multi-images | Concept | Data source |
| --- | --- | --- | --- | --- | --- |
| DreamBooth (Ruiz et al., ) | $\leq$ 180 | Objects | ✓ |  | Web |
| BLIP-Diffusion (Li et al., ) | 129M | Objects |  |  | Mixture of datasets |
| FastComposer (Xiao et al., ) | 70K | Human Faces |  | ✓ | FFHQ-wild (Karras et al., ) |
| CustomConcept101 (Kumari et al., ) | 642 | Objects and Faces | ✓ | ✓ | Web |
| RetriBooru (Ours) | 116K | Anime Figures | ✓ | ✓ | Danbooru (Branwen et al., ) |

It is very costly to collect multiple identities with multiple clothing images, and approaches that rely merely on CLIP features do not have enough sensitivity to reliably classify clothing identities. To ameliorate this, we leverage current large models to obtain clothing labels for our dataset with filtering heuristics. We construct our RetriBooru dataset from the Danbooru 2019 Figures dataset (Branwen et al., ), which cropped 855880 images of single anime figures from [Danbooru](https://safebooru.donmai.us/) by anime character detection model (Li & Shahjahan, ). We perform filtering by cloth tags, visual annotations using existing robust segmenter and detector, and clothing clustering using a visual-question answering (VQA) model. We use Instruct-BLIP (Liu et al., ) with Vicuna-7B as the VQA model, ask it descriptive questions for short answers, e.g., “list top two colors of the clothing”, and cluster images of the same character wearing the same outfits using a strict heuristic that matches the output answers. Please see Supp. A.1 for processing details. In the end, RetriBooru retains 116729 training samples, where each training sample could serve as either the target image or a reference image for another target. Each of the reference image has the same character, outfits, and is drawn by the same artist as the target image. We show details of the dataset in Fig. 2. On the left is a sample image and its annotations, including basic information, mask and face bounding box, prompts and cloth tags, and a list of IDs which can access to other samples of the same identities. On the right are the distributions of the number of same-identity samples for each sample, top-15 characters present, and top-30 most frequent cloth tags. Each sample has at least one reference image in the “similar” entry, and there are 4232 samples which have $\geq$15 reference images. We also compare with proposed datasets in previous work in Tab. 1. Note that the larger the datasets are, the less functionalities they enable due to annotation costs, and vice versa. In comparison, RetriBooru hits the best balance between size and capabilities, where there are multi-images of an identity (similar images to the target), as well as concept-aware labeling (two concepts per sample, face and cloths). CustomConcept101 (Kumari et al., ) is the most similar dataset to ours serving the same functionalities, but only contains image clusters of 101 realistic objects, in total 642 images. Using automated pipeline and strict answer matching to group multiple images by identities, RetriBooru is able to collect accurate annotations, and enable learning to compose separated concepts which will be further discussed.

### 3.1 Benchmarking Existing Models

Figure: (a) Prompt 1
Refer to caption: x4.png

Training. We adopt FastComposer (Xiao et al., ), ControlNet (Zhang et al., ), IP-Adapter (Ye et al., ), and Kandinsky (Razzhigaev et al., ) to finetune on our dataset (initialized with SD v1.5 weights), as they are the latest open source methods that process conditional images with distinct designs: FastComposer injects identifiers to help place objects (in conditional images) into one image; ControlNet learns pixel-wise control and exploits spatial structures on purpose, passing conditioning to the U-Net via zero convolutions; IP-Adapter passes reference images to a frozen encoder and additionally learn to adapt the features, adding the same outputs to all layers in U-Net; Kandinsky adopts a prior network (taking prompts and reference) and U-Net (target and reference) that can be pre-trained separately. Due to the limited computing power, we finetune with resolution 256 and FP16 for all methods without rigorous hyper-parameter searching, using 8 NVIDIA V100 GPUs. Note that we do not pursue the peak performance but conduct sufficient training for our analysis, and we do not leverage extra training tricks such as additional loss updates on face parts. To verify our motivation and assumptions, we develop two training settings: -a denotes existing training pipeline, which applies two different transforms the same image as target and reference (conditional) image, and -b adopts a same-identity but different image from target as the reference image, everything else unchanged. It would be more fair and informative to compare two settings within the same method to better evaluate the impact of target information leakage.

Evaluation. Our evaluation set consists of 40 in-domain anime characters and 10 out-domain characters present in recent anime series, as well as 5 prompts from in-domain characters. For each character-prompt pair, we generate images with 384 resolution with 5 random seeds and 4 samples per seeds. In total, we have 5000 generated images for evaluation for each model. We use CLIP scores between generated images and reference image, generated images and text prompt to evaluate identity preservation and text alignment, denoted as CLIP-I and CLIP-T. We also multiply two quantities element-wisely to roughly evaluate the balance. See Supp. A.3 for detailed training and evaluation settings, including fixed parameter choices for the models.

Figure: Table 2: Comparison of models by CLIP-I and CLIP-T scores. Left: average scores across validation prompts. Right: A scatter plot that discloses the balance between text and image prompt alignment. Overall, IP-Adapter-0.5-b achieves the best balance.
[Uncaptioned image]: x6.png

Results analysis.We report CLIP scores in Tab. 3.1 with a scatter plot to compare model balances between image and text conditioning. As -b results suggest, using a different image as the reference image in general improves image-text balance across diverse methods, motivating a better fusion by reducing the target information leakage. Among the finetuned models, Kandinsky-0.1-b achieves the best identity preservation, FastComposer-0.5-b achieves the best text alignment, and IP-Adapter-0.5-b achieves the best balance. ControlNet models tend to fit to text and produce a worse identity preservation under -b. This is due to its zero convolutions’ pixel-to-pixel control, which essentially cannot support -b setting. It makes learning pixel-wise mapping from a different reference to the target more challenging than overfitting to the texts in search of convergence. This also indicates why later methods (Ye et al., ; Li et al., ), including our RetriNet, adopt cross attentions to connect conditional encoder to the U-Net for flexible control. To qualitatively demonstrate the benefits of our -b setting, we choose two image-prompt pairs to visualize inference results of IP-Adapter for $\texttt{scale}=[0.25,0.5,0.75]$ in Fig. 3. We observe that: a) When given a fixed scale, our -b combines reference image and prompt better than original -a. b) Given various scales, -b continues to produce better balanced generation, showing robustness against over-fitting, saving time for searching inference parameters to generate balanced outputs. c) When -a collapses with off scales (0.75), -b can still generate plausible, better results. These further validate the effectiveness of our proposed new training scheme.

Overall, RetriBooru is superior with increased sample size, extra identity annotations, multi-concepts functionality (Tab. 1), and more performance friendly. With identity annotations, we can not only enable a better training pipeline using different reference images, but also enable future tasks which learns to retrieve different concepts accurately from different reference images.

## 4 Similarity Weighted Diversity

Although our new training pipeline enabled by annotating clothes has been justified, there lies a discrepancy between qualitative results and metric scores. The goal of subject-driven generation is to generate images flexibly while maintaining subject identity (object or personal) and combining text prompts well. As discussed in Sec. 2, existing metrics measure image and text similarities separately. However, observe that the better qualitative results of -b setting are only roughly reflected in Tab. 3.1, and decoupled averages of the metrics are not good measures of qualities of subject driven images. Oftentimes, some generated images tend to resemble reference images while others follow texts, especially when generation parameters are not well-optimized, yielding inflated averaged scores. We provide a class of metrics to combine similarity and diversity metrics, which require both extracting the desired information from reference images and combining reference information with texts. Hence, it is better suited for referenced generation. Our metrics also benefit from continued improvements in the precision of similarity and diversity measurements. For instance, CLIP-I is not yet an optimal measurement identity preservation because preserving other irrelevant style, layout and semantic information also contributes to CLIP-I. In practice, these irrelevant information usually interfere with text prompts, resulting in artifacts.

A reference image generation model can be written as a function $f:r,\theta_{r}\rightarrow g$, where $r$ represents reference image(s), $\theta$ is the collection of all generation parameters for the run (the prompt, scheduler, guidance scale etc.), and g is the generated image. We denote div and sim (diversity, similarity) measurement functions as $\text{div}:r,g\rightarrow\mathbb{R},\quad\text{sim}:r,g\rightarrow\mathbb{R}$. Under this notation, for a pair of measurement functions div and sim, we define:

$$ $\text{SWD}(\text{div},\text{sim})(f)=\frac{1}{|(r,\theta_{r})|}\sum_{r,g=f(r, \theta_{r})}\text{div}(r,g)\cdot\text{sim}(r,g)\vspace{-2.5pt}$ (1) $$

where each tuple $(r,\theta_{r})$ represents a test generation with the reference images $r$ and parameters $\theta_{r}$. $|(r,\theta_{r})|$ is the total number of such runs. We illustrate with two concrete examples.

Measuring explicit diversity. As briefly mentioned, in (Wang et al., ), authors noticed that some approaches can inadvertently impact text control. A notable example is the inability to seamlessly integrate the facial area with the background style. This limitation highlights a trade-off between face fidelity and text control. This trade-off of face fidelity and text fidelity could be masked by simply considering CLIP-I and CLIP-T separately. A worse trade-off of having high CLIP-I, low CLIP-T for half of the images and low CLIP-I, high CLIP-T for the other half results in medium CLIP-I and CLIP-T scores, but generates very low amount of ideal images where identity is preserved, text control is followed, and image-text is well fused. Since text control explicitly dictates diversity from input reference images, we take CLIP-I to be sim, CLIP-T to be div and can consider this as a better measurement for explicit (prompt-driven) diversity. In this case, $\text{SWD}(\text{CLIP-T},\text{CLIP-I})$ works as a filter for images that are both consistent to the reference images and follows the text prompts. Because of Cauchy-Schwartz inequality:

$$ $\sum_{r,g=f(r,\theta_{r})}\text{div}(r,g)\cdot\text{sim}(r,g))^{2}\leq\sum_{r, g=f(r,\theta_{r})}\text{div}(r,g)^{2}\cdot\sum_{r,g=f(r,\theta_{r})}\text{sim} (r,g)^{2}$ (2) $$

The metric encourages simultaneous achievement of reference consistency and prompt consistency, i.e. better distribution of CLIP-T with respect to CLIP-I.

Measuring implicit diversity. When generating faces, different head poses and expressions are implicit to the distribution. When generating anime characters, the characters could be in different poses and expression too. These are implicit data distribution diversities. Then SWD (as we will define for anime images) captures the fact that generated images should preserve the identities but still not be rigid and have a fixed pose. We can measure this by asking a VQA system (InstructBLIP (Liu et al., ) Vicuna-7B) descriptive questions about explicit attributes and compare answers, and we denote this metric as the VQA score. For instance, we can ask the VQA model about head orientation, facial expressions, body gestures, activities and so on. To compare two generated images, we embed the answers into vectors and compute the cosine similarity. See more details in Supp. A.2.

We will use SWD(VQA, CLIP-I), SWD(VQA, CLIP-T), and SWD(CLIP-I, CLIP-T) to evaluate Retribooru tasks in Tab. 3. We have also seen one simultaneous independent work using face distance as sim and LPIPS as div in (Wang et al., ) (Trusted Div. in Sec. 4.1).

## 5 Concept Composition Task

Figure: Figure 4: An illustration of concept composition task on RetriBooru using RetriNet. We pass reference concepts into the retrieval encoder to encode precisely only the relevant information. We pass noisy target image and prompt made with Danbooru tags to a copy of denoising U-Net. Note that we process reference images, texts, and time with corresponding frozen encoders, and we have frozen encoder and middle blocks of SD. We designate the embeddings derived from target images and prompts as Query (Q), while the embeddings from reference images and text serve as Key and Values (KV). Following the cross attention layers are zero-convolution layers.
Refer to caption: x7.png

We extend our -b setting in Sec. 3.1, using multiple reference images from the “similar” entry of the target. In the following sections, we refer to directly using various reference images as the “reconstruction” task, given its unchanged training goal despite various reference. We further propose a concept composition task, where different reference images carry different concepts for the condition encoder to retrieve and compose. As shown in Fig. 1, we use annotated bounding boxes and masks to separate desired concepts from the reference images, and pass to the condition encoder along with the corresponding texts. Note that we randomly choose $N$ reference images and obtain either “face” or “clothes” concepts independently, instead of building $N$ reference images by dividing each of $N/2$ images into two concepts. In rare cases, we replace the “clothes” reference with its whole image, denoted as “figure” reference, if the face bounding box occupies the majority of the image. See Supp. A.4 for implementation details. Likewise, for reconstruction task, we directly pick $N$ reference images and pass them to the condition encoder with texts “figure”. Concept composition is a more difficult task than reconstruction, as it needs to not only recognize the concepts in the reference, but also learn to compose them properly.

Figure: (a) Prompt 1
Refer to caption: x8.png

Expectation for $N$. Ideally, We want $N$ to be as large as it can be supported by sufficient annotations. When the reference image is the same as the target, the conditional encoder cannot constrain what information is passed and learned, forming shortcuts based on inductive bias such as geometric structures, shapes and gestures, leading to overfitting. Hence, information from inductive bias is leaked to the model for convergence, while the characteristics of an identity is insufficiently learned. However, when the reference image maintains only the identity but has other attributes differently such as orientations, poses, activities, it naturally breaks shortcuts based on the inductive bias, limits the model to learn identity from only characteristic features, and thus learns from the correct and trustworthy information. With the number of annotated reference images increasing, it better approximates the data distribution with more discrete, diverse samples of the same identity, and applies more constraints to calibrate on retrieving the correct information. In the best but unrealistic case, “similar” represents the identity’s space.

### 5.1 RetriNet

Observed in Tab. 3.1, ControlNet-b (Zhang et al., ) overfits to text prompt to avoid the hard task of learning image conditioning. However, we can adopt cross attention layers to connect control module to the U-Net and thus enabling flexible control. This approach can also support training on our new task. We propose a modified architecture RetriNet, which retrieves concepts from references via a retrieval encoder and inject them into the denoising U-Net via cross attention layers, without relying on geometric controls. To the best of our knowledge, we are the first to show this structure works without the need for geometric information or layout guidance, such as key-points and semantic masks. Fig. 4 demonstrates our architecture design and the pipeline for training concept composition task on RetriBooru. This approach unifies geometric retrieval instead of pre-processing for different key-points and masks for each different task.
When geometric or layout information are given (as some of the simultaneous and independent virtual try-on and video generation methods we surveyed have done), the abilities demonstrated are the encoding of reference appearances.
We push the abilities even further, showing that RetriNet can simultaneously generate and reconstruct geometry and appearance. We also show that RetriNet can retrieve and compose geometry and appearance. See Supp. A.4 for more details. Note that unlike concurrent work such as IP-Adapter (Ye et al., ) that adds a common cross attention output to U-Net layers, RetriNet computes cross attentions and adds to U-Net decoder for each layer individually, as Fig. 4 marks the corresponding layer numbers.

Training objective. Let $\mathbf{M}_{\text{tgt}}$ be the mask of the valid area of the target image (excluding padding). Let $\mathbf{M}_{\text{face}}$ be face masks for each target. Denote the original reconstruction loss as $\mathcal{L}(\epsilon,\epsilon_{\theta}(\cdot))$, our loss between the target and reconstruction then becomes

$$ $\mathcal{L}^{\prime}=\mathcal{L}(\epsilon\mathbf{M}_{\text{tgt}},\epsilon_{ \theta}(\cdot)\mathbf{M}_{\text{tgt}})+\lambda\mathcal{L}(\epsilon\mathbf{M}_{ \text{face}},\epsilon_{\theta}(\cdot)\mathbf{M}_{\text{face}}).\vspace{-17.5pt}$ (3) $$

### 5.2 Experiments

Setup. We conduct both concept composition and reconstruction tasks on RetriBooru with RetriNet, providing baseline results for future research. We also combine reconstruction and concept composition as one retrieval task, denoted as multitask. We follow the standard denoising training. SD encoder, decoder, and retrieval encoder blocks are initialized with corresponding blocks in SD v1.5 weights. We train on $8\times$ NVIDIA V100 GPUs, with resolution 384, FP32, batch size 1 but accumulate every 8 batches. Training 9000 steps roughly requires 72 GPU hours. We perform one longer 45000-step training for each task, with trainable retrieval block and U-Net decoder, and a $p=0.5$ drop-rate to drop text prompt to the U-Net. By default, we use $N=4$ reference images. We also conduct various ablation studies for 9000 steps and run inference outputs at resolution 384, with the same evaluation set and procedure specified in Sec. 3.1, except that we prepare reference images the same way as training our tasks. See Supp. A.4 for other fixed choices of hyper-parameters.

Figure: Figure 6: Attention maps of early to deeper layers in the retrieval block.
Refer to caption: x10.png

Figure: Table 3: Baseline results on RetriBooru. Left: Average scores across validation prompts, and we mark the highest for each task. Right: A scatter plot that discloses the balance between diversity (text) and similarity (image). Longer training achieves better CLIP-I CLIP-T balance.
[Uncaptioned image]: x11.png

Quantitative analysis and ablations. We record quantitative results in Tab. 3, and visualize balances between diversity (text) and similarity (image) in the scatter plots on the right. “R-, C-, M-” represents reconstruction, concept composition, and multitask, followed by number of training steps. “P-” denotes a prompt droprate different from the default $0.5$. “LockD, LockB” refer to freezing the U-Net decoder and freezing both the U-Net decoder and retrieval encoder. We summarize that: a) Training w/o locking the frozen image encoders adopted in (Ye et al., ; Li et al., ) results in better generalization. Observe that freezing either network module harms the performance for reconstruction and concept composition, with “-LockB” having more impact. This is due to the extra objective of the retrieval encoder to recognize the information to retrieve from the conditioning, and it can not adopt a frozen image encoder and decoder without such training. b) A lower drop rate helps guide the model learning by more presence of text prompts for the more difficult concept composition, where retrieving conditioning from reference images is more challenging than reconstruction task. This explains why C9kP025 achieves best similarity-weighted diversity (SWD) scores among concept composition models. Given different tasks of different difficulties, models are more sensitive to the prompt drop-rate. We argue that C9kP025 tends to fit to text prompts during training in pursuit of faster convergence. While imbalanced convergence is not encouraged, this finding suggests future work on constraining the existing objectives. c) As the top scatter plot suggests, longer training benefits CLIP-I and CLIP-T balance, despite that longer training tends to trade CLIP-T for improved CLIP-I. d) -45k do not necessarily outperform -9k models. This indicates that the training on RetriBooru can converge fast at earlier phase. Combining with c, we hypothesize that later training mainly aims at better fusing the image reference and the text prompt.

Qualitative analysis and visualizations. We provide qualitative results from -45k models of three tasks on RetriBooru dataset and record generated images in Fig. 5, selecting three characters for each of the two prompts. “Multitask (recon)” denotes running image generation in the same fashion as reconstruction task, and vice versa. We observe that R45k has achieved best image quality and best diversity-similarity balance among three models: light-reflecting hair, less artifacts, diverse details, etc. This also aligns with our SWD scores, where R45k achieves best VQA_CLIP-T and CLIP-I_CLIP-T among the three. M45k in general has the second best image quality, but sometimes retain the background and accessory details of the reference images, affecting diversity. C45k displays the most flexible and diverse generation, and follows well the text prompt. However, since concept composition is more challenging, we can observe a few more artifacts such as round head and limb issues. These observations are also reflected by these models’ SWD scores. This further validates the effectiveness of evaluating diversity-similarity balance using the proposed VQA score and SWD metrics. Additionally, we visualize attention maps at different layers of the retrieval encoder from the C45k model in Fig. 6. Given a simple background, the retrieval encoder is able to locate the identity at an early stage. With deeper layers, the identifying texts are able to highlight the corresponding semantics on the reference images, and the attention regions are further refined with timesteps. At $t=0$ for Input Block 7, “clothes” and “face” can be properly highlighted as intended. Note that the “face” region can sometimes also be highlighted by “clothes”. It is due to the additional loss update on the face bounding box we adopt per Eqn. 3, as well as the cropping for “face” reference images for our training.

Figure: (a) Prompt 1
Refer to caption: x12.png

Generalizing to other domain. Our observations and conclusions from both experiment sections also generalize to other domain. Specifically, adopting different reference image(s) with the same identity as target (-b setting), unfreezing conditional encoder and U-Net decoder for the new pipeline, and applying a text droprate contribute to a better subject-driven generation model. We follow these conclusions to pre-train RetriNet on existing human face datasets (Rothe et al., ; Liu et al., ; An et al., ), and provide qualitative comparisons with public models of FastComposer and IP-Adapter for faces in Fig. 7. Baseline generation results from vanilla SD are also included. Our training pipeline keeps a better identity-diversity balance and combines prompts and reference images better, while other methods maintain a worse trade-off. The ability to generalize to more complex data also depends on the computation resources, where higher resolution accommodates more details. Our largest possible training resolution is 384, limited by V100. Note that we do not search for the optimal parameters for human face training as it is not our focus; this experiment only serves to validate that our proposed dataset and training settings can provide valuable observations and generalize to other data domains.

## 6 Conclusion

In this paper, we propose a new dataset RetriBooru, which enables new training pipelines and tasks with extra identity annotations. We successfully show that using same-identity pairs (reference and target image have the same identity but are not the same image) results in more robust generalizations, and also enable training for composing different concepts from different reference images, using a newly designed model. Moreover, we propose a new group of metrics to weight similarity (image identity) and diversity (text prompt), which aligns well with visualizations and provide better evaluation. Our dataset facilitate research with constrained computes and provide enough samples to yield meaningful analysis that can generalize. Our study sheds light on improving current training procedure and objectives.

## Appendix A Supplementary

In this section, we provide supplementary materials to the main paper, including further details, limitations, and maintenance plans. All coding and annotation files will be released. Again, RetriBooru is an anime dataset based on the existing open-source Danbooru 19 Figures dataset (Branwen et al., ). Our main contribution lies in the extra annotations, including labeling clothing identities, which enable new training pipeline and tasks as mentioned in the main paper.

### A.1 Data Collection and Processing

#### Filtering.

We first clean and filter noisy samples by unwanted tags such as “monochrome” and “sketch” images. We also remove images with multiple character tags. In order to cluster cloth tags in the following steps, we scrape clothing tags from [Danbooru](https://danbooru.donmai.us/), and filter trivial tags from them such as tags for shoes and accessories. We then filter samples which do not contain any of the remaining 1298 cloth tags for further clustering. At the end of the filtering stage, we have obtained 599192 images, each with a single character and artist, and contains at least one meaningful cloth tag. Note that all images are safe-for-work as the original Danbooru 19 Figures (Branwen et al., ) has performed this filtering.

#### Vision annotations.

We create segmentation masks of characters by IS-Net (Qin et al., ), as well as head bounding boxes by YOLO-v5 (Jocher et al., ). Both models were pre-trained on the largest Danbooru 2021 dataset (Anonymous et al., ) to secure inference quality. Segmentation masks and head bounding boxes allow us to separate different concepts of an anime character into whole figure, clothes, and face, which facilitate future training of choice. Moreover, both annotations help create masks for these concepts to provide refined training, such as extra weighted loss computation on the masked parts.

#### Clustering clothes.

Labeling clothing identity is a difficult yet crucial process in order to train with consistent samples of a concept class. We use Instruct-BLIP (Liu et al., ) with Vicuna-7B and a heuristic to cluster answers. Instruct-BLIP is a visual question-answering (VQA) model which takes texts and images jointly and outputs understandable answers for further processing.

Figure: Algorithm 1 Cluster Images by VQA answers

We first group images by the same character and artist to align the artistic styles. For $N_{c}$ images of each character-artist class, we ask the VQA model to “List top two colors of the character’s cloths”. We then iterate these samples pairwise to cluster them based on matching answers in $\mathcal{O}(N_{c}^{2})$. Note that it is a strict heuristic and the order matters, i.e., “black and pink” and “pink and black” reflect different probability distributions and will not be clustered together. In the end, we obtain 116729 samples, where each image sample is now connected to other images with the same character, artist, and the clothing. Algorithm 1 summarizes our approach in a Python-like pseudo-code, which can generalize to future data construction.

There are two limitations to this approach. First, the proposed question has overlooked finer details in pursuit of stable outputs, such as textures and design patterns of the clothes. Second, in order to filter out unrelated answers, the matching heuristic has rejected $80\%$ of initial data strictly, including correct and usable samples. The more detailed and abstract the questions are, the more irrelevant and inaccurate responses can be sampled. With more advanced VQA models in the future, more questions can be better understood and our clustering performance can be further improved.

### A.2 More Details of the VQA Score

Figure: Figure 8: Demonstration (also motivation) of VQA-based evaluation using GPT-4 on a generated image. An optimal VQA model can function as human evaluation and provide detailed, understandable descriptions. Using text embedding from accurate answers, we can properly evaluate the details of the image beyond semantics and measure the diversity based on distance metrics. Moreover, we can adjust prompt questions to focus on different aspects as shown.
Refer to caption: x14.png

We use a VQA model to measure $\text{div}(r,g)$, as Figure 8 gives an optimal example of the VQA evaluation. Given a set of images generated by the same reference images and prompt, we first ask the VQA model a few descriptive questions focusing on different aspects for each image. We then convert the answers to text embedding using the CLIP model, and compute the pairwise cosine distance between the embedding of the generated image and that of the reference image. In practice, we use InstructBLIP (Liu et al., ) with Vicuna-7B as our VQA model, and ask the second and third questions as shown in Figure 8. We also include a few example answers in Table 4, which are human-understandable and informative enough for the following evaluation.

The motivation of the proposed VQA score is to evaluate image details that are overlooked by CLIP score. While the CLIP score focuses on geometry and semantics, our VQA score evaluates generated details which are under-conditioned, or controlled by text prompts, such as facial expressions, gestures, and clothing details. These perspectives also demonstrate the flexibility of generation. Our VQA score hence can evaluate the diversity of the generated images, which contributes to an SWD metric.

**Table 4: Example answers from InstructBLIP with Vicuna-7B, based on images generated by various prompts and references, using the pre-trained RetriNet on the concept composition task.**
| Q1 | Q2 |
| --- | --- |
|  | The character in the image is a young girl with long blonde hair, |
| The character in the image is wearing headphones and has a ponytail | wearing headphones and a tie. She appears to be smiling or posing |
| hairstyle. Her facial expression appears to be cheerful or happy, | happily while listening to music through her headphones. Her |
| as she is smiling and giving a thumbs-up gesture. | clothing consists of a white shirt, black tie, and pigtails. |
| The facial expressions and hairstyles of the character are cute, | The character in the image is a blue-haired anime girl wearing a |
| innocent, and adorable. She has a big smile on her face and is | swimsuit. She is posing and leaning forward, with her hands on |
| wearing a sailor-style outfit with blue eyeshadow. Her hair is short | her hips. Her clothing consists of a one-piece swimsuit that |
| and styled in a bobbed or ponytail style. Additionally, she | exposes her midriff. Additionally, she appears to be |
| appears to be posing seductively for the camera. | standing on top of a wooden table or bench. |
|  | The character in the image is an anime girl wearing a black hat, |
| The character in the image is wearing a black hat and has white hair. | white dress, and brown boots. She is sitting on a bench with her |
| Her facial expression appears to be neutral or calm, | legs crossed while holding a red strawberry between her toes. |
| while her hairstyle is long and flowing down her back. | Additionally, she appears to be smiling at the viewer. This |
|  | combination of poses and clothing creates a unique and eye-catching |
|  | image that showcases the character’s personality and playful nature. |
|  | The character in the image is a young girl with long blonde hair, |
| The character in the image is wearing a black dress and has long | wearing a black dress. She has her arms crossed over her chest and |
| blonde hair. Her facial expression appears to be serious or | appears to be posing or holding herself in a particular way. Her |
| thoughtful, while her hairstyle is styled with bangs that frame | clothing suggests that she may be dressed up for a special occasion or |
| her face. | attending a formal event. In terms of current actions, there is no |
|  | specific action depicted in the image, as it is an illustration rather |
|  | than a live-action scene. |
| The character in the image has a pink hairstyle and is wearing an | The character in the image is a pink-haired anime girl wearing a blue |
| angel costume. Her facial expression appears to be neutral, with no | outfit with wings on her back. Her poses and current actions suggest |
| visible emotions or expressions on her face. Additionally, she has | that she is flying or hovering above the ground, possibly using her |
| large wings behind her back, which further emphasizes her role as | wings to propel herself through the air. She appears to be graceful |
| an angel-like character. | and agile while maintaining control of her flight. |

### A.3 More Details of the Benchmarking Training

To benchmark selected methods in RetiBooru, we adopt official code bases for FastComposer (Xiao et al., ) and IP-Adapter (Ye et al., ), and training scripts from the HuggingFace diffusers library for ControlNet (Zhang et al., ) and Kandinsky (Razzhigaev et al., ). For all methods, we load pre-trained weights for SD U-Net from runwayml/stable-diffusion-v1-5 on HuggingFace, and openai/clip-vit-large-patch14 as the image encoder. We train with the same resolution $256$, batch size $1$, gradient accumulation steps $8$, learning rate $1^{-5}$, and precision FP16, on $8$ NVIDIA V100 GPUs. We pre-train each model (each method, each setting) for 24 GPU hours. Inference parameters are in general kept default, and we adopt guidance scale 7. We keep other default settings as specified in their official code bases, with the following unique specifications and modifications of each method:

FastComposer: We add the default identifier “A $<|\text{image}|>$” to the start of our prompts, and set uncondition_prob to $0.5$ to drop text prompts. We set the number of objects in the image to $1$ and we only have one object_types which we by default choose “person”. We use our masks to obtain object images and set the object resolution to $256$. For -b training pipeline, we choose a random image from the “similar” entry of our target annotation and process it as the object image, which will be passed as the conditioning. During inference, we adopt the default $\alpha=0.7$.

IP-Adapter: We prepare our text prompts and images by the default settings, and follow its default logics to drop texts and conditional images with small probabilities. For -b setting, we choose a random reference image as the conditioning, which is referred as clip_image in its code base. During inference, we choose $\texttt{scale}=0.5$ for both qualitative and quantitative evaluation, and we also infer with $[0.25,0.75]$ for a more comprehensive visual comparisons.

ControlNet: Similar to IP-Adapter, we keep the default settings from the diffusers library except that we set proportion_empty_prompts to 0 0. For -b setting, we choose a random reference image as the conditioning image (conditioning_pixel_values). Inference parameters are kept default.

Kandinsky: We pre-train prior network and decoder network separately, using the same set of hyper-parameters. Like training ControlNet, we we set proportion_empty_prompts to 0 0. For -b setting, we choose a random reference image. During inference, we infer with $\texttt{strength}=[0.1,0.2]$ as the paper suggests smaller strengths.

Figure 9 provides expanded scatter plots to evaluate the similarity-diversity balance, clustering all $5000$ inferred samples for each model. -b settings (oranges) help improve the balance as we observe that it is moving more towards the y-axis and thus diagonal than -a settings (purples). Among the benchmarked methods, IP-Adapter achieves the best effect in improving the balance, while ControlNet models are shifted a bit excessively by -b, and FastComposer has smaller effect. We also include CLIP-I_CLIP-T and CLIP-I_VQA scatter plots for our RetriNet models (rightmost column) pre-trained on reconstruction and concept composition tasks for $9000$ steps (same GPU hours). We cannot compare the improvement by a different task, but to provide a visualized comparison with previous methods such that our methods are more balanced (closer to the diagonal) and more concentrated with less imbalanced generation.

Figure: Figure 9: Detailed scatter plots for evaluating similarity-diversity balance. We observe that for benchmarking results, especially IP-Adapter, -b settings can improve the balance by shifting the clusters closer to the diagonal. Note that our proposed methods (rightmost column) achieves the best balance with the highest concentration, signifying the success of our proposed approaches. All models are pre-trained with the same length of GPU hours.
Refer to caption: x15.png

### A.4 More Details of New Tasks

We provide more details of our proposed reconstruction and concept composition tasks on RetriBooru, as well as training details using RetiNet. By default, we randomly choose $N=4$ reference images from the “similar” entry of the target. During data processing, we can utilize head bounding boxes and masks to obtain face images and masks, as well as cloth images and masks, dividing into two concepts. For reconstruction, we simply pass whole-figure reference images with “figure” captions. For concept composition, we randomly choose $N$ reference images, and crop each image into “face” or “clothes” concepts with equal probability. While cropping a face image is straightforward, we obtain a cloth image by cropping out the region above the lower horizontal border of the face bounding box ($\leq\texttt{y_max}$). In rare occasions where $\texttt{y_max}>\frac{2}{3}\cdot\texttt{height}$, i.e. character in the reference image is upside-down or is a face close-up, we leave the reference image unchanged and caption with “figure” in concept composition task. For multitask, each batch has the equal probability to be processed in the same fashion as reconstruction or composition during data processing.

#### RetriNet details.

We follow the official implementation of ControlNet (Zhang et al., ) and modify it into RetriNet. Specifically, we add additional cross attention layers right before zero-convolution layers, as illustrated in Figure 4. We implement our cross attention layers as shown in Code 1, with proper reshaping and layer normalization. Here, control is the output from our retrieval block and hs the output from U-Net encoder. We pass control as KV and hs as Q and output the final hs to the U-Net decoder.

Figure: Code 1: Python implementation of the cross attention layers that connect retrieval block to the U-Net.

#### Training details.

In addition to training settings specified in Section 5.2, we set up a cosine learning rate schedule with a initial rate$=1^{-4}$, and restart the schedule every $9000$ steps without decay. On target image, we use face image and mask for additional update and refine the generation, as specified in the training objective in Equation 3. Note that since our objective is still whole-figure generation, we need to choose a small coefficient $\lambda\approx 0.1$ for face loss, because equal weight would encourage the model to focus on learning faces (which are more stable than body parts), and generate more close-up images or more counterfactual body parts.

### A.5 Anime related Work

Anime-based products have a lot of demand in the industry, where most social media platforms and image editing apps offer many popular anime related effects and filters. It is also a popular test-ground for many computer vision tasks, such as statistical image generation (Noguchi & Harada, ), subject-driven generation (Hua et al., ), facial recognition (Naftali et al., ), model watermarking (Qiao et al., ), multi-modal learning (Yi et al., ), transfer learning in GANs (Mangla et al., ), knowledge distillation (Cui et al., ), text detection (Del Gobbo & Matuk Herrera, ), image super-resolution (Dai et al., ), face detection (He et al., )), etc.

### A.6 Limitations And Future Maintenance

There are a few limitations of our work. First, we are limited by computation resources such that we could not provide further converged benchmarking training with optimal hyper-parameters. While our experiment results suffice to demonstrate the contribution of our proposed new training pipeline enabled by RetriBooru, we look forward to benchmark our dataset with more methods and exploit more ways of utilizing the rich annotations. Second, the performance of our annotations, including clothing identities, depends on the off-the-shelf models. While we are confident about the segmentation and detection quality since those models are pre-trained on a larger body of Danbooru dataset (Anonymous et al., ), clustering clothing identities depends on the generation quality of the chosen VQA model. With a more advanced open-source VQA model in the future, we would love to upgrade our annotations with more detailed question inputs. This also applies to SWD(VQA,CLIP-I), where answers to longer, more detailed questions contain more irrelevant responses. Furthermore, we will expand our dataset with the growing number of posts on [Danbooru](https://safebooru.donmai.us/), and include more refined annotations of concepts (e.g., hands, eyes, shoes) using text-guided Segment Anything models.

## Peer Reviews

confidence: 3
contribution: 2
initial_rating: 5
presentation: 3
questions: What is the solid example that can showcase the propose method can reduce leakage of target image? We suggest authors provide quantitative or qualitative analysis of reduced target image leakage. For example, providing side-by-side comparisons of generated images with and without your proposed method and highlight the areas that contain unwanted information.

In the Evaluation part, why set 384 resolution for each model? The size 384 is relative resolution compared the default resolution in reference stage of some models. For example, IP-Adapter is trained at a resolution of 512x512 and it has degraded subject-preserving ability when generating low resolution image. We suggest justify the choice of 384 and discuss how this choice may affect comparisons to models typically used at higher resolutions by conducting ablation study.
soundness: 2
strengths: Authors propose Similarity Weighted Diversity (SWD) metrics to jointly measure the image similarity and text alignment which can be a new type metric to evaluate identity-preserving of existing subject-preserving generation models. 
Author propose new concept composition task which takes different reference images from same identity to generate new image in same identity. It enables a flexible pose, action generation but preserving the identity and cloth, etc. from reference images.
summary: This paper proposes a large-scale dataset RetriBooru for training subject-preserving generation model, for each identity, it has multiple image include various scale and cloth. They introduce a new composition task, where the conditioning encoder learns to retrieve different concepts from several reference images. For evaluation, they propose new metrics named Similarity Weighted Diversity (SWD), aim to measure the alignment between similarity and diversity.
Their main contribution are in following aspects:
1.	Proposing an anime dataset RetriBooru for anime character preserving generation with desired cloth with diverse poses.
2.	Proposing a new training pipeline for subject-driven generation by using a reference image different from the target but with the same identity. 

3.	Proposing a new concept composition task, which learns to retrieve specific aspect information or various concepts from different reference images, and provide baseline results with our baseline architecture RetriNet. 

4.	Proposing new metrics (SWD) to evaluate referenced image generation methods.
weaknesses: The paper title and several parts in the main text of paper mention “leakage-free” and “reduce leakage”. However, there is no supported related experiments conducted by authors. 
Authors propose -b training scheme that uses a same-identity but different image from target as the reference image. However, the definition target is not clear and it is not unique for each identity. Training scheme -a could also be one case of -b training setting.  

-b training scheme doesn’t ensure a general good performance in CLIP-I and CLIP-T scores. For example, -b training scheme decrease CLIP-I on ControlNet and IP-Adapter and decrease CLIP-T on Kandinsky-0.1, Kandinsky-0.2.

---

confidence: 4
contribution: 2
initial_rating: 3
presentation: 2
questions: 1. Does the dataset specify the annotation level? From the information provided in the paper, I am unable to find any evidence regarding this.

2. The motivation concerning information leakage is not substantiated throughout the paper. Could you provide relevant evidence to demonstrate the extent to which information leakage has been reduced?

3. A partial image may exhibit different angles. How is the selection of partial images with varying attributes determined?

4. How can we mitigate the influence of partial images that are not addressed in the textual description?
soundness: 2
strengths: The paper contributes a new dataset to solve the information leakage problem by using part images with different attributions or descriptions.
summary: The paper proposes a dataset termed RetriBooru, which aims to solve the leakage of spatial information. 
The dataset is multi-level and same-identify with some reference images with different attributions.  
The authors use the dataset to train baseline models for performance verification.
weaknesses: 1. I question whether the motivation is reasonable. The authors suggest that the similarity between the reference image and the target image can easily lead to spatial information leakage. Although they propose using partial images with different attributes to address this issue, these partial images can also contain spatial information. Furthermore, collecting such partial images for general domains is challenging, and ensuring their accurate and comprehensive annotation may not be fully achievable.

2. The comparisons presented in Table 1 are not clearly delineated. Based solely on the information in the table, readers may struggle to identify any significant differences between this dataset and others.

3. The authors have exclusively utilized anime images to construct the dataset, which may limit its generalizability. Anime images often feature simplistic backgrounds and restricted attributes. I wonder if this could contribute to the poor performance observed in Figure 7 (prompt 2).

4. In Figure 4, I have concerns regarding the comprehensiveness of the annotation for the partial images. Would providing attributes from the entire area enhance generation performance? Additionally, how can we effectively control the details of the entire face? Should the dataset be updated to incorporate these insights? Lastly, how should the granularity of the annotations be defined?

---

confidence: 4
contribution: 3
initial_rating: 5
presentation: 3
questions: 1. In Figure4, why some area in noise target image is masked?
2. In Figure4, two faces and two clothes are input as reference concepts. When inference, is it necessary two faces and two clothes? 
3. Is the dataset will be public?
soundness: 2
strengths: 1. RetriBooru, this dataset is useful for future research.
2. The new concept composition task proposed in this paper is interesting and worth study.
summary: This paper propose RetriBooru Dataset, allowing training with reference images that are different from the target image but share the same identity. A new concept composition task is introduced and RetriNet is designed for this task. Finally, this paper introduces a new metrics named SWD to measure the similarity and diversity.
weaknesses: 1. In the comparison of qualitative results Figure3, apart from prompt2 with scale=0.75 where the advantage of method B is evident, I cannot see clear advantages of IP-Adapter-b over IP-Adapter-a in other case.
2. In Figure7, I have the same opinion for the result generalizing to human face. ie, I don't think training pipeline of this paper keeps a better  identity-diversity balance, and the human ID is worse than other methods. Although the author claims the result is limited by V100, it is hard to distinguish whether the training pipeline or GPU limit the performance. And the effectiveness of this method on real datasets is not convincing.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 2
questions: - Can you annotate the improvements in your qualitative results compared to the baseline in the images? Or can you describe in words what the advantages are?
- It would be better to show more results of different conclusions under domain generalization. For example, what is the impact of different text drop rates?
- In the current visualizations, are the combined concepts all from the same character's face and clothing, just with different reference images? Are there any unconventional combinations, such as one character's face with another character's clothing?
- Can you demonstrate the differences in metrics between the 40 in-domain and 10 out-of-domain characters mentioned in Section 3.1?
soundness: 3
strengths: - Originality:
The paper demonstrates some originality, which is reflected in the collection and validation of the effectiveness of avoiding target leakage on the anime dataset, as well as in the proposal of balancing metrics.
- Quality:
The experiments and analyses appear to be well-structured and comprehensive. The methodology seems sound, and the experiments have been designed to sufficiently validate the proposed approach.
- Significance:
The conclusions such as avoiding target leakage are reasonable and carry a certain level of significance.
summary: The paper explains a method for creating a Danbooru-based dataset categorized by characters and concepts, and tests the impact of training with various reference images that align conceptually but differ visually from the target image. It also introduces metrics for managing diversity and similarity, presents a new task for combining concepts, and establishes a benchmark network for training.
weaknesses: - Limited Dataset Application: After validating the conclusions, it seems that the dataset can only be applied to customization or conditional encoder training within the anime domain.
- Insufficient Innovation in Concept Combination Task: The proposed concept combination task, which simply combines anime faces and clothing into a single image, lacks significant innovation or meaning. The visual results, such as in Figure 5 (prompt 1, second row), show relatively ordinary combinations, with low similarity between faces or clothing and the reference images.
- Vague Qualitative Results: The qualitative comparison results are somewhat ambiguous. It would be better to specify exactly what aspects are improved or to annotate the specific areas of improvement in the images.
- Need for More Experimental Results in Domain Generalization: Simple qualitative comparison images between two groups are insufficient. Therefore, conducting generalization tests for different conclusions, and even providing quantitative metrics, would be more convincing.
- Clarity in Explanation and Writing: Some parts of the explanation and writing could be clearer. For instance, the proposed balancing metric (Equation 2), which appears to be missing a left parenthesis, lacks clear and understandable explanations. Illustrating how this metric addresses ‘a worse trade-off’ mentioned in your paper would clarify its effectiveness.
- Domain Difference In Section 3.1:  Your evaluation set includes 40 in-domain characters and 10 out-of-domain characters, but this distinction is not further explained in the results. I am curious whether the domain difference has any impact on the metrics. Are there any qualitative results you can show?