DomainGallery: Few-shot Domain-driven Image Generation by Attribute-centric Finetuning

Authors: yuxuan  duan
yan  hong
bo  zhang
jun  lan
huijia  zhu
weiqiang  wang
jianfu  zhang
li  niu
liqing  zhang
Venue: NeurIPS_cc_2024_Conference
Published: 2024-05-06 08:33:05

Abstract: The recent progress in text-to-image models pretrained on large-scale datasets has enabled us to generate various images as long as we provide a text prompt describing what we want. Nevertheless, the availability of these models is still limited when we expect to generate images that fall into a specific domain either hard to describe or just unseen to the models. In this work, we propose DomainGallery, a few-shot domain-driven image generation method which aims at finetuning pretrained Stable Diffusion on few-shot target datasets in an attribute-centric manner. Specifically, DomainGallery features prior attribute erasure, attribute disentanglement, regularization and enhancement. These techniques are tailored to few-shot domain-driven generation in order to solve key issues that previous works have failed to settle. Extensive experiments are given to validate the superior performance of DomainGallery on a variety of domain-driven generation scenarios.

Main paper: 
 introduction: 
 Walking down the street, you see an artist painting portrait sketches for people. You are fascinated by a couple of masterpieces set by the side, showing his/her unique painting style which you find it difficult to describe by words. Deeply interested, you are in the mood for seeing more sketches, and it would be perfect to see him/her painting other things like dogs, especially your favorite ones at home. As a fundamental topic in computer vision, image generation has been attracting enormous research efforts. However, through the years from VAEs [23] , GANs [13] to diffusion models [16] , generative models are becoming more and more data-hungry in order to properly model the distribution of images, as the most recent Stable Diffusions [35] have been trained on billions of text-image pairs [39] . Thus unfortunately, it is usually infeasible to directly train a generative model given only few-shot (around ten, or fewer) images of a specific target domain.To tackle such challenging scenarios, one paradigm of solutions is model transfer, which first trains a model on a relevant source domain and then transfers it to the target domain by finetuning on the few-shot target dataset. Nevertheless, as Zhao et al. [56] have pointed out, the performance of model transfer methods will be significantly influenced by the relevance between source/target domains. Therefore, the applicability of these methods will be limited if we either fail to find a proper source dataset, or just do not have enough resources to train a generative model from scratch.With the recent progress in pretrained text-to-image (T2I) models [28, 31-33, 35, 38, 52] , it seems that anything can be generated simply by putting a text prompt into an off-the-shelf pretrained T2I model. However, T2I models are still far from once for all solutions to image generation. Sometimes it is difficult or even impossible to precisely describe certain styles (e.g. sketches by an artist) and contents (e.g. new concepts or personalized subjects), or what we want is simply unseen (thus unknown) to the model. Fortunately, T2I models can serve as universal source models to be finetuned on specific target datasets. Recent works finetuning T2I models have mostly focused on either finetuning with relatively abundant images (tens, hundreds, or more) [11] , or few-shot subject-driven generation whose datasets consist of a single person or object [12, 37] . On the contrary, few-shot domain-driven generation analogous to the conventional model transfer has rarely been explored.In this work, we analyze and perform few-shot domain-driven image generation from the view of attributes, as a domain is defined by common attributes shared among images (see Sec. 3). We seek to master four generation cases as illustrated in Fig. 1 : Intra-category: The generated images contain both the domain attributes and the categorical attribute of the given target dataset, as in conventional model transfer; Cross-category: While containing non-categorical domain attributes, images of other categories can be generated through text control, as a feature of T2I models; Extra attribute: Either intra-or cross-category, we can attach additional attributes to the images; Personalization: We hope to combine domain-driven and subject-driven generation for better personalization. In order to achieve these goals, we propose DomainGallery, adopting DreamBooth-like [37] finetuning paradigm where the non-categorical domain attributes are learned and bound to an identifier word, so that the generation can be done via a normal T2I pipeline. DomainGallery features four attributecentric finetuning techniques which respectively settle four challenges:(1) Prior attribute erasure: The prior attributes of the identifier word may possibly show up even if we have bound new domain attributes to it. Therefore, we pre-erase these prior attributes to avoid unexpected elements in images.(2) Attribute disentanglement: The domain/categorical attributes corresponding to the identifier/category word may be leaked into each other, causing missing domain attributes and/or unexpected categorical attributes when we change the category word in cross-category generation. Therefore, we explicitly encourage domain-category disentanglement to prevent such leakage.(3) Attribute regularization: The model is prone to overfitting when finetuned on few-shot datasets. Therefore, we regularize the finetuning process (with a strategy to construct paired source/target latent codes and a regularization loss) to reduce overfitting caused by excessive presence of domain attributes and possible biases of dataset distributions.(4) Attribute enhancement: Sometimes the strengths of the domain attributes learned on a specific dataset category are insufficient for cross-category generation. Therefore, we adjust the intensity of the domain attributes when generating cross-category images for better fidelity.These techniques spreading over pre-finetuning (1)(2), finetuning (2)(3) and inference (4) , are tailored to few-shot domain-driven generation, aiming at solving key issues that previous works have failed to settle. Later in Sec. 5, we conduct thorough experiments on several few-shot datasets. These experiments manifest the superior and satisfying performance of DomainGallery on all of the four generation scenarios, which can serve as a state-of-the-art method of few-shot domain-driven image generation. 
related work: 
 Model Transfer Model Transfer (of conventional noise-to-image models instead of T2I ones) is a mainstream paradigm of solutions to few-shot image generation. Methods following this paradigm transfer models trained on related source datasets to target domains by finetuning on few-shot target datasets. Model transfer has been thoroughly explored using GANs [10, 18, 25-27, 29, 30, 34, 43, 46, 47, 50, 51, 55-58, 61] , with a few base on diffusion models [20, 59] . Since T2I models came to light, people have been freed from choosing proper source datasets/models, and attention has been turned to finetuning T2I models as generic source models.As one of the most frequently explored finetuning scenarios, subject-driven generation has attracted much research effort [2, 5, 7, 17, 24, 44, 48, 54] since the pioneering works Textual Inversion [12] and DreamBooth [37] . Actually, subject-driven generation can be categorized as a special case of domain-driven generation, where the domain is defined by a particular person or object. To preserve the subject identity, fidelity is highly preferred to diversity, as diversity is scarcely evaluated quantitatively by these works. On the contrary, in general domaindriven generation the domains are usually not confined to a specific subject. Therefore diversity is as important as fidelity, and we will evaluate both just as model transfer works do.We follow previous works to name our goal as few-shot domain-driven image generation. Analogous to subject-driven, the term domain-driven implies finetuning from T2I models, which enables us to take advantage of the multi-modal capability of these models to achieve a variety of generation scenarios (see Fig. 1(c-f )). To the best of our knowledge, there is only one previous work focusing on this topic, namely DomainStudio [60] . It finetunes a Stable Diffusion model towards the target domain by learning an identifier similar to DreamBooth [37] , yet equipped with additional losses to enhance diversity and high-frequency details. In Sec. 4, we will analyze some crucial issues in domain-driven generation that previous works have failed to settle, and accordingly propose attribute-centric solutions to these problems.Other Similar Tasks There are some other works focusing on resembling tasks. For instance, Everaert et al. [11] have focused on finetuning under limited data (tens to hundreds) with per-image text prompts. Such requirement of image quantity and prompts has limited its applicability. Another similar topic is T2I style transfer [4, 6, 11, 40] , which usually extracts style information from a single style image and controls the content via text. A key issue shared by these works is how to clearly defining the boundary between style and content from a single image. Instead, domains can be naturally delimited as the common attributes shared among multiple images, which also enables us to learn a domain of certain contents, rather than styles.Question: Does the paper discuss the limitations of the work performed by the authors?Answer: [Yes]Justification: See Appendix C.Guidelines:• The answer NA means that the paper has no limitation while the answer No means that the paper has limitations, but those are not discussed in the paper. • The authors are encouraged to create a separate "Limitations" section in their paper.• The paper should point out any strong assumptions and how robust the results are to violations of these assumptions (e.g., independence assumptions, noiseless settings, model well-specification, asymptotic approximations only holding locally). The authors should reflect on how these assumptions might be violated in practice and what the implications would be. • The authors should reflect on the scope of the claims made, e.g., if the approach was only tested on a few datasets or with a few runs. In general, empirical results often depend on implicit assumptions, which should be articulated. • The authors should reflect on the factors that influence the performance of the approach.For example, a facial recognition algorithm may perform poorly when image resolution is low or images are taken in low lighting. Or a speech-to-text system might not be used reliably to provide closed captions for online lectures because it fails to handle technical jargon. • The authors should discuss the computational efficiency of the proposed algorithms and how they scale with dataset size. • If applicable, the authors should discuss possible limitations of their approach to address problems of privacy and fairness. • While the authors might fear that complete honesty about limitations might be used by reviewers as grounds for rejection, a worse outcome might be that reviewers discover limitations that aren't acknowledged in the paper. The authors should use their best judgment and recognize that individual actions in favor of transparency play an important role in developing norms that preserve the integrity of the community. Reviewers will be specifically instructed to not penalize honesty concerning limitations. 
preliminary: 
 Domain Formally, a domain D can be defined as a sample space X and a data distribution P data on X [1] . However, this definition is excessively general as any group of arbitrary images can form a domain. In this work, we would like to provide a rather intuitive definition from the viewpoint of common attributes. We regard an image X to be composed of a set of attributes {a i } N i=1 , where each a i can be either abstract like a certain style, or concrete like a specific category or certain content. Then, an image domain D can be defined as the common attributes shared by all the images of this domain: a D = X∈D X. According to such definition, an image belongs to this domain if and only if it contains all the common attributes: X ∈ D ⇐⇒ a D ⊆ X. Take the few-shot sketches of faces in Fig. 1 (a) as an example, a D includes shared categorical attribute of human faces and the attributes of this specific painting style, while the content attributes indicating individuals are not shared. Therefore, any facial sketch of any person in such style belongs to this domain.Since in real-world scenarios, images in few-shot datasets usually share a common category (e.g. face in Fig. 1(a) ), it is natural that categorical attribute should be one of the domain attributes. However, to extend domain-driven generation to cross-category scenarios as in Fig. 1(d) , in this work we exclude the categorical attribute from a D so that the domain attributes refer to non-categorical attributes only. For instance, the domain in Fig. 1 will be referred to as sketches (of anything) in this certain style.Diffusion Model Diffusion model [8, 16, 42] is a recent genre of generative models. It aims at reversing a diffusion process by recurrently predicting the noises based on noisy data and denoising them accordingly till proper images are rendered. For practical usage in high-resolution and conditional cases, Latent Diffusion Model (LDM) [35] is often adopted which moves the diffusion process to latent spaces with pretrained VAEs [23] . LDM is commonly trained using a simplified objective asEQUATIONwhere l, c, ϵ and t are respectively latent codes, conditions, ground-truth noises and time steps. The module τ θ is the encoder of the condition and ϵ θ is the noise-predicting network which is usually a UNet [36] . As special instances of LDM, Stable Diffusion (SD) series are pretrained on large-scale text-image datasets such as LAION-5B [39] . They serve as state-of-the-art T2I models that are widely used as base models in many tasks, including our DomainGallery as well.DreamBooth As a pioneering work in subject-driven image generation, DreamBooth [37] binds the information of the subject to an identifier [V], which is a rarely used word such as sks, together with a corresponding category word [N], such as dog. Then images of the target subject can be generated by using prompts like "a [V] [N]". For domain-driven image generation, we inherit such design to bind (non-categorical) domain attributes to [V], so that by changing category words or adding extra attributes via text, DomainGallery is capable of generating various images within the given domain.Low-Rank Adaptation Low-Rank Adaptation (LoRA) [19] is a popular finetuning method frequently used on SD models. Instead of finetuning the parameters W ∈ R din×dout , LoRA finetunes rank decomposition matrices A ∈ R din×r and B ∈ R r×dout as in Ŵ = W + A • B, where r is very small and W is fixed. Finetuned LoRA parameters can be easily shared and used with base models due to much smaller sizes. DomainGallery adopts LoRA when finetuning SD on target datasets.Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?Answer: [NA]• The assumptions made should be given (e.g., Normally distributed errors).• It should be clear whether the error bar is the standard deviation or the standard error of the mean. • It is OK to report 1-sigma error bars, but one should state it. The authors should preferably report a 2-sigma error bar than state that they have a 96% CI, if the hypothesis of Normality of errors is not verified. • For asymmetric distributions, the authors should be careful not to show in tables or figures symmetric error bars that would yield results that are out of range (e.g. negative error rates). • If error bars are reported in tables or plots, The authors should explain in the text how they were calculated and reference the corresponding figures or tables in the text. 
domaingallery: 
 In this section, we will give a detailed description of DomainGallery. As in Fig. 2 , the full pipeline has three steps: prior attribute erasure in Sec. 4.1, finetuning in Sec. 4.2, and inference in Sec. 4.4.Following DreamBooth, we link target domain attributes to an identifier [V]. Although we expect to select a rarely used word without obvious meaning, this word may have still been bound to certain prior attributes. For instance, the commonly used sks is actually the abbreviation of a rifle [49] , thus images generated with [V] in prompts will contain military elements, like the helmet in Fig. 2(a) . In subject-driven generation such prior attributes are not problems, since the text condition "a [V] [N]", as a whole, will gradually overfit to the given subject dataset and override these prior attributes. Also, [V] will never be paired with another category (e.g. "a [V] cat" when the subject is a dog), while in domain-driven generation we expect [V] to be applicable to any category. According to the results in Sec. 5.2 and Appendix B.1, if not pre-erased, these prior attributes will appear in cross-category images, which verifies that these prior attributes are merely concealed rather than eliminated, and it is necessary to erase them before usage.Since the prior attributes are bound to the identifier in a data-driven manner when T2I models are pretrained, it is difficult to theoretically specify which attributes have been linked to [V] . Therefore, we propose an empirical solution to prior attribute erasure. Based on a noisy source latent l src that has been added noise ϵ in the forward process, DomainGallery predicts the added noises ϵ src and ϵ s→t using the same LoRA-equipped UNet respectively with source text condition c src = "a [N]" and target condition c tgt = "a [V] [N]". Then, the prior attribute erasure loss is defined asEQUATION"" where we omit time step t and text encoder τ in the UNet ϵ θ,ϕ for brevity, ϕ indicates LoRA parameters and gs(•) is the gradient stopping operation that stops the gradient from propagating through or updating the parameters inside. By imposing L erase , we hope that the model predicts the same with or without [V], hence the prior attributes in [V] will be removed."a [N]" "a [V] [N]" "[V]" (c) Attribute Enhancement (inference time) V-uncond VN-N × 𝜆 1 × 𝜆 1 × 𝜆 1 ⋅ 𝜆 2 × 𝜆 1 ⋅ 𝜆 2Besides L erase , the prior preservation loss L prior of DreamBooth is also applied which trains on source images I src generated by the base model of SD itself as training a diffusion model ordinarily via Eq. ( 1). Also, disentanglement loss L disen is also included, which will be detailed in Sec. 4.2.After erasure, the learned LoRA parameters ϕ will be used to initialize LoRA in the finetuning period.With prior attributes of [V] erased, DomainGallery then learns to bind the target domain attributes to [V]. In addition to a standard finetuning on target datasets by L tgt via Eq. ( 1), with prior preservation on pre-generated source images, we propose domain-category attribute disentanglement loss L disen and transfer-based similarity consistency loss L sim , as depicted in Fig. 2(b) . To tackle this issue, we try to enhance the disentanglement between [V] and [N], so that all the domain attributes will only be learned into [V] without leaking into [N], and categorical attributes in [N] will not be lost. In other words, attributes of [N] after finetuning should not be different from those before. As we use LoRA, the base model before finetuning is ready to use by simply disenabling LoRA parameters ϕ temporarily since the UNet is fixed. Based on noisy source latent l src and source text condition c src , the domain-category attribute disentanglement loss can be formulated asEQUATIONwhere ϵ θ without ϕ is the base UNet whose LoRA parameters are detached.Attribute Regularization Adding regularization is a common practice of model transfer methods [30, 51, 57] to prevent overfitting, where features from paired source/target images generated from the same noise are usually required. However, according to the training objective of SD in Eq. ( 1), no fully denoised latent (i.e. at time step 0) will be generated, let alone paired source/target latents. DomainStudio [60] has proposed a regularization, which applies a similarity consistency loss [30] on batches of source/target images Îsrc / Îtgt decoded from denoised latents lsrc / ltgt after a single-step denoising from noisy latents l src /l tgt . However, there are four drawbacks in this design: (1) singlestep denoising usually does not lead to meaningful latents/images unless the timestep is small; (2) decoding latents into images induces significant overhead of computation and storage;(3) computing cosine similarity between pixel-level images is less reasonable; (4) Îsrc / Îtgt are unpaired as they derives from unpaired input source/target images I src /I tgt , which do not fit the similarity consistency loss requiring paired images/features. In our DomainGallery, we propose a strategy of constructing paired source/target latents, followed by a new regularization term named transfer-based similarity consistency loss, which overcomes the aforementioned drawbacks.First we try to settle (1) and (4) by constructing denoised, meaningful and paired latent codes. As in the right part of Fig. 2 (b), given a batch of l src at time step t, we conduct an n-step recurrent denoising following the accelerated denoising process of DDIM [42] and a linearly decreasing time step schedule from t to 0. We intuitively set n = 5 to balance denoising quality and speed. We do recurrent denoising for twice, respectively with source/target text c src /c tgt , and obtain lsrc / ls→t . If we decode them into images Îsrc / Îs→t , we will find that Îs→t simultaneously have partial target domain attributes after conditioned on c tgt , and share certain similarity with Îsrc since they derive from the same l src . Hence lsrc / ls→t are paired. Next, without actually decoding them into images, we reuse the encoder of UNet as a pretrained feature extractor to directly extract multi-layer features from lsrc and ls→t , and compute the similarity consistency loss asEQUATIONwhere f k represents features extracted by the UNet encoder at its k-th layer (of N layers). From the viewpoint of the i-th latent (of B latents in the batch), first its cosine similarities with other latents are computed, followed by a softmax operation transforming them into a probabilistic distribution p i . Then, Kullback-Leibler Divergence will be computed between two distributions respectively from li src and li s→t , and will be averaged among all i and layers k. In conclusion, L sim helps to prevent overfitting by matching the similarity distributions among a batch of paired lsrc / ls→t . By operating on the features directly extracted from latents rather than on images, our L sim settles (2) and (3) as well.The objective functions of prior attribute erasure and finetuning are respectivelyEQUATIONwhere λ prior = 1.0, λ disen = 10.0, λ erase = 10.0, λ sim = 1.0 generally renders good results. Note that as we utilize LoRA in DomainGallery, only the additional parameters ϕ of LoRA will be updated.In preliminary cross-category experiments, the domain attributes are not sufficiently manifested sometimes. A possible reason is that L sim has limited the strengths of these attributes to the minimal, just enough to transfer images of the original category, while for cross-category scenarios these attributes may need enhancing. As shown in Fig. 2 (c), we propose an inference-time attribute enhancement based on classifier-free guidance (CFG) [15] . Specifically, after applying CFG with default weight λ 1 = 7.5, we additionally increase the strength of [V] by either ofEQUATIONBetween the two enhancing modes above, we empirically find that V-uncond generally outperforms its counterpart (see Appendix B.1). We will by default apply V-uncond with λ 2 = 1.0 during cross-category generation.For personalization scenarios, we straightforwardly combine our DomainGallery with DreamBooth in a single stage. Specifically, during the finetuning process in Sec. 4.2, the model is additionally finetuned on target subject images and source images of subject category via Eq. ( 1). In such cases, the objective of finetuning in Eq. ( 5) will be rewritten asEQUATIONwhere λ subject is empirically set to 1.0. While we suppose that there may be a more delicate way to equip DomainGallery with subject-driven methods, we would like to leave it for future works. 
experimental setting: 
 Baseline Our baseline list includes DreamBooth [37] , as the basis of our method; a LoRA [19] version of DreamBooth, since we utilize LoRA in DomainGallery; and finally DomainStudio [60] , as the only previous work in few-shot domain-driven image generation.Dataset We test our method on five widely used 10-shot datasets, including CUFS sketches [45] ([N]: face), FFHQ sunglasses [21] ([N]: face), Van Gogh houses [30] ([N]: house), watercolor dogs [41] ([N]: dog) and wrecked cars [30] ([N]: car). Note that though sunglasses and wrecked cars may also be generated by directly mentioning their content attributes in text prompts, we still try on these datasets to prove that DomainGallery can also learn content attributes. Experiments are conducted on resolution 512 × 512 except for DomainStudio which is only capable of 256 × 256 even on a 40GB VRAM GPU.Metric We provide quantitative results for intra-category generation since we have dataset images as ground truth. For datasets with full sets (CUFS sketches and FFHQ sunglasses), we compute FID [14] between 1,000 samples with the full sets. For the others, we replace FID with KID [3] (×10 3 ) which better fits few-shot scenarios [9, 10, 22, 56, 58] . Intra-clustered LPIPS [30, 53] of 1,000 samples with the few-shot training sets is also reported as a standalone diversity metric.Detail For other details of the experiments and DomainGallery, please refer to Appendix A. Extra Attribute In Fig. 5 and Fig. 1 (e), we show some images generated by DomainGallery on CUFS sketches with extra attributes added to either intra-or cross-category scenarios. We may infer from these results that though we only provide simple prompt (i.e. "a [V] [N]") rather than detailed description for each image of the target dataset, training DomainGallery does not destruct the original text-image structures of SD. The images are still under full control through text prompts, including facial expressions, additional contents (e.g. accessories), sub-category (e.g. a breed of animals), background, and specific instances (e.g. celebrities or brands).Besides, the bottom row of Fig. 5 illustrates some samples where the extra attributes (blue) provided in the text prompt are in conflict with the domain attributes (colorless). In such case, DomainGallery is capable of generating images with partially fused attributes. While the images are generally in grayscale, some blue feathers still appear. These results verify the generalization ability of our method and suggest that it may be open to other generation scenarios such as local editing and style blending.Personalization In the last scenario, DomainGallery is combined with DreamBooth to learn a target domain and a target subject simultaneously, as described in Sec. 4.5. Results in Fig. 6 manifest that such combination is feasible for both intra-category (the target dataset and subject share the same category, e.g. watercolor dogs and the subject of specific dog) and cross-category (otherwise) pairs of datasets. Together with the results of the previous scenario with extra attributes, the satisfying performance of DomainGallery shows its potentials to be applied to parallel or downstream tasks. Ablation Study To prove that the proposed attribute-centric techniques can indeed effectively improve the performance of DomainGallery in various generation scenarios, we conduct extensive ablation studies focusing on these techniques and leave them in Appendix B.1 due to page limit. 
conclusion: 
 In this work, we focus on few-shot domain-driven image generation by analyzing several key issues that previous works have failed to settle, and accordingly proposing a new method named Domain-Gallery. DomainGallery features four attribute-centric finetuning techniques that aim at solving these issues, namely prior attribute erasure, attribute disentanglement, attribute regularization and attribute enhancement. With these designs tailored to domain-driven generation, our DomainGallery achieves convincing performance on both intra-category and cross-category generation scenarios, while supporting extra attributes added by text prompts. Additionally, DomainGallery can be aggregated with subject-driven generation as well, which further extends its applicability. In Appendix C, we will discuss possible limitations and potential future works of DomainGallery. as we increase λ sim . Besides, since L sim can prevent the model from learning unnecessary attributes induced by the bias of the few-shot datasets, it also enhances the fidelity of the generated images. However when the weight exceeds 1.0, the regularization inhibits the model from learning necessary domain attributes as the fidelity begins to deteriorate.Attribute Enhancement As the last part of the ablation study we investigate the effects of attribute enhancement in Sec. 4.4 during inference time. First we try to apply our attribute enhancement to the three baselines (DreamBooth [37] , DreamBooth + LoRA, and DomainStudio [60] ). As the top three rows of Fig. 9 show, enhancing [V] alone cannot improve the fidelity of the images, unless we properly learn the target domain attributes into [V] in the first place, as our DomainGallery does (see the bottom row of Fig. 9 ).Besides, as we have proposed two modes of attribute enhancement in Sec. 4.4, we would like to make a comparison between them. In the last two rows of Fig. 9 we illustrate samples generated following either mode. Although both modes can enhance the domain attributes to certain extents compared to DomainGallery without attribute enhancement in the fourth row of Fig. 9 , the mode of V-uncond generally performs better than its counterpart. Therefore, we utilize V-uncond in DomainGallery by default when generating cross-category images. 
experiments compute resources: 
 Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?Answer: [Yes] Justification: See the implementation details in Appendix A.Guidelines:• The answer NA means that the paper does not include experiments.• The paper should indicate the type of compute workers CPU or GPU, internal cluster, or cloud provider, including relevant memory and storage. • The paper should provide the amount of compute required for each of the individual experimental runs as well as estimate the total compute. • The paper should disclose whether the full research project required more compute than the experiments reported in the paper (e.g., preliminary or failed experiments that didn't make it into the paper). 
code of ethics: 
 Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?Answer: [Yes] Justification: N/A.Guidelines:• The answer NA means that the authors have not reviewed the NeurIPS Code of Ethics.• If the authors answer No, they should explain the special circumstances that require a deviation from the Code of Ethics. • The authors should make sure to preserve anonymity (e.g., if there is a special consideration due to laws or regulations in their jurisdiction). 
broader impacts: 
 Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?Answer: [Yes] Justification: See Appendix D.Guidelines:• The answer NA means that there is no societal impact of the work performed.• If the authors answer NA or No, they should explain why their work has no societal impact or why the paper does not address societal impact. • Examples of negative societal impacts include potential malicious or unintended uses (e.g., disinformation, generating fake profiles, surveillance), fairness considerations (e.g., deployment of technologies that could make decisions that unfairly impact specific groups), privacy considerations, and security considerations. 
 
 Appendix: In this section, we present additional qualitative results that are not illustrated in the main paper due to page limit.Intra-category Besides the intra-category images on CUFS sketches shown in Fig. 3 , we depict those on the other datasets in Fig. 10 . Generally, our DomainGallery surpasses the baselines on all the datasets. It is also worth mentioning that in few-shot domain-driven generation, the domains are not limited to certain styles (as in CUFS sketches, Van Gogh houses and watercolor dogs). Instead, our method is also applicable to domains of certain contents (FFHQ sunglasses and wrecked cars).Cross-category Cross-category images of the other datasets not shown in Fig. 4 of the main paper are in Fig. 11 . Similar to the results in the main paper, elements of the prior attributes of [V], and attribute leakage between [V] and [N] can also be observed in these images, which necessitates prior attribute erasure and attribute disentanglement proposed in DomainGallery.In this work, we propose DomainGallery, a new method for few-shot domain-driven image generation.Although the experiments in Sec. 5 and Appendix B have validated the capability of DomainGallery, there are still some limitations w.r.t. the availability of our method which indicate directions for future works, as discussed below.• Our method may not be able to handle the cases where the datasets consist images of different categories (e.g. a set of paintings of various objects by a certain artist), since DomainGallery follows DreamBooth that finetunes on a single category word [N]. However, with minor modification to the DreamBooth-like finetuning pipeline, DomainGallery may be capable of such cases by using per-image category words. • Although we assume that domains should be defined based on obvious common attributes, sometimes there are composite domains that include several sub-domains (e.g. portraits painted by several artists of the Renaissance). In such cases the common attributes among all the images may be subtle and hard to tell. Therefore, for few-shot domain-driven methods (not limited to DomainGallery), domains with clear common attributes are preferred. • Currently the performance of DomainGallery on domains of contents (e.g. FFHQ sunglasses) is still in need of further improvement, as we admit that the cross-category images on FFHQ sunglasses shown in Fig. 11 have undergone some cherry-picking. We suppose that it is much more difficult to finetune models on few-shot datasets of certain local contents than global styles (e.g. CUFS sketches), since semantic relations between the contents and the backgrounds (e.g. where to put sunglasses on faces, or even on faces of animals) can only be well learned through rather adequate data. Therefore, how to make few-shot domain-driven methods master on content domains is another direction for future works.As a new method for few-shot domain-driven image generation, DomainGallery can be used either in creative AI applications, or generating image data as a non-traditional data augmentation for various downstream tasks. Furthermore, as image generation is a fundamental task in computer vision, the idea of DomainGallery may also be applied to researches in other topics.However, similar to all the methods of image generation (including but not limited to few-shot domaindriven image generation), our method may induce possible societal harms, including fake image generation for misuse and copyright violation, depending on the specific applications. Therefore, we hereby request proper usage of DomainGallery. Guidelines:• The answer NA means that the abstract and introduction do not include the claims made in the paper. • The abstract and/or introduction should clearly state the claims made, including the contributions made in the paper and important assumptions and limitations. A No or NA answer to this question will not be perceived well by the reviewers. • The claims made should match theoretical and experimental results, and reflect how much the results can be expected to generalize to other settings. • It is fine to include aspirational goals as motivation as long as it is clear that these goals are not attained by the paper.https://huggingface.co/CompVis/stable-diffusion-v1-4https://github.com/huggingface/pefthttps://huggingface.co/docs/transformers/main/en/perf_train_gpu_onehttps://www.crosslabs.org/blog/diffusion-with-offset-noise 


Decision: This paper proposes a few-shot domain-driven image generation method which tries to finetune the pretrained Stable Diffusion on few-shot target datasets in an attribute-centric manner. It supports features including prior attribute erasure, attribute disentanglement, attribute regularization and attribute enhancement. The reviewers like this paper due to 1) the studied task is interesting; 2) the method is well-motivated and solid; 3) both qualitative and quantitative results look promising; and 4) the writing is clear and easy to follow. There are some minor concerns on the novelty, missing additional explanations and analysis, etc. But the rebuttal has resolved most of them, and the reviewers are satisfied in the end. The authors should include the reviewers' suggestions in the final version. (If the authors think some additional suggested references are not very related to this paper, feel free to ignore them.)

Reviews: review: paper_summary: paper_summary: This paper addresses the few-shot domain transfer problem in text-to-image diffusion generation, where the goal is to keep the style and attributes of the source examples while being able to generate images of potentially different subject matters. It binds the attributes to rarely-used tokens, but observes that these tokens could potentially induce correlated unintended features, and it adopts a prior-attribute erasure procedure to remove such correlation. It then finetunes the model for domain transfer, enforcing disentanglement of attributes and subject categories and applying attribute regularization. Additionally, for cross-category generation, it proposes an attribute enhancement technique to make the learned attributes more prominent in the generations.
strength_weakness: strength_weakness: * The paper has discussed most of the limitations of the method, such as in cases where the examples contain multiple subject categories or multiple sub-domains, or in cases with certain local/content attributes. 

* One additional case is that as the method infers the attributes infers from the examples, sometimes it can pick up unintended attributes that the few-shot examples happen to share (e.g. for FFHQ glasses, cross-category generations mostly have outdoor/nature backgrounds, even though this may not be necessarily intended for this setting). It would be interesting to see extensions that allow more explicit control over including/excluding certain attributes.
questions: questions: * It would be helpful to have more clarifications on whether the qualitative results mostly randomly selected or hand-picked, especially given that the performance of cross-category generations are primarily demonstrated through qualitative visualizations. The paper mentions that the cross-category generations for FFHQ sunglasses in Fig 11 involved some cherry-picking, but does not seem to specify for the others.

* For better understanding of the proposed method's behavior, it would interesting to explore the boundary for what attributes get encoded into the binding tokens. For example, when all examples contain one subject centered in the pictures, whether/to what extent the number, position or subject size are considered part of the attributes and get picked up by [V]. It would also be interesting to see how the method behaves when the textual prompt contains conflicting attributes with the learned binding token (e.g. "A [V] bird with blue feathers" where [V] is learned from colorless sketches).
limitations: limitations: The authors have adequately discussed the limitations and societal impact.
paper_summary: paper_summary: Text-to-image generation models pre-trained on large-scale datasets made progress but the models are still limited when we expect to generate images that fall into specific domain or style that are hard to describe or unseen to models. This paper proposed the DomainGallery, a few-shot domain-driven image generation method which aims at finetuning pre-trained stable diffusion on few-shot target datasets in an attribute-centric manner. The proposed method focuses on attribute operations, including erasure, disentanglement, regularization and enhancement.
strength_weakness: strength_weakness: -	It seems to me that there are several pipelines and tasks to perform in this paper, but the technical challenges should be illustrated in a concise and precise manner. It seems to me that the engineering solutions and objectives are clearly illustrates but the technical challenges are not summarized well. In this way, the technical contributions seem weak and unclear. 
-	The proposed method seems like a combination of existing techniques. The novelty seems limited unless the authors argue specifically. 
-	There seems to lack specific error analysis on whether the result improvement is due to the proposed method. It would be very important to demonstrate this, either quantitatively, or qualitatively. At least, in different dataset directions, e.g skeches, sunglasses. shall we demonstrate what exactly causes the improvements? Why improvements on which samples in the dataset?
questions: questions: Please reply with points in the weakness.
limitations: limitations: Please see weakness
paper_summary: paper_summary: This paper introduces a few-shot domain-driven image generation method that finetunes pretrained Stable Diffusion in an attribute-centric manner. It features prior attribute erasure, attribute disentanglement, attribute regularization and attribute enhancement.
strength_weakness: strength_weakness: 1. The similarity consistency loss has been utilized in GAN-based methods. It is similar to “Few-shot image generation via cross-domain correspondence”[1].
2. The comparative experiments for personalization are missing, such as textual inversion.
3. The concept of multi-attribute transfer is quite similar to hybrid domain adaptation[2]. It needs to include a conceptual comparison in the related work section.

> [1] Ojha U, Li Y, Lu J, et al. Few-shot image generation via cross-domain correspondence[C]//Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021: 10743-10752. 

> [2] Li H, Liu Y, Xia L, et al. Few-shot Hybrid Domain Adaptation of Image Generator[C]//The Twelfth International Conference on Learning Representations. 2023.
questions: questions: As seen in weakness.
limitations: limitations: The manuscript includes discussions on limitations and social impacts.
paper_summary: paper_summary: This paper tackles the problem of few-shot image generation, in a scenario where it is domain-driven and defined by several attributes shared among different target data.
strength_weakness: strength_weakness: 1. The base models covered in this work are limited. In fact, while Dreambooth is one of the exemplar baseline for few-shot text-to-image (T2I) models, there are more latest and advanced T2I models also suitable for this study. I would suggest the authors to cover 1-2 more advanced T2I models to demonstrate that the proposed DomainGallery framework is a generalized method and applicable to different model structure / design.

2. I did not see any discussion / visualization of the possible failure cases. It is better to include the failure examples to show the boundary of the proposed method.
questions: questions: 1. I would like to ask if the authors consider the mixture of style/attributes, in contrast to the multi-subject customization work, using different unique identifiers?
Indeed, I do see the mixture of [style] and [subject] results in Figure 6, but it is better if you can include the results of mixture-of-style as the supplement.

2. Are visualization results in the experiments obtained via fixed/deterministic sampling and fixed input/noise? In this way, we can compare different methods clearly and fairly.
limitations: limitations: The authors discussed the limitations and broader impact properly in the appendix C and D. 

Meanwhile, I appreciate that the authors acknowledge the cherry-picking and issues of generated images on the Sunglasses dataset, as mentioned in the limitation section.

Comments: title: To ACs and Reviewers: A Summary of the Discussions
Acknowledgement
comment: At the end of the discussion period, we would like to thank you all for your time and effort. We are delighted that our DomainGallery has received many insightful comments, as well as common approval from all the reviewers. We believe that these discussions will definitely make our work a better one.

We have already summarized the strengths of our work that recognized by the reviewers in the *Global Response to All Reviewers*. For your convenience, here we further collate the main concerns raised by the reviewers and our responses to them, and present them as below.

### Reviewer 2oCE

- *Possible unexpected common attributes*: We have clarified that learning all the common attributes (either expected or unexpected) complies with the definition of domain-driven generation. We have also provided a possible solution to explicitly exclude unwanted attributes similar to what we have done to categorical attributes.
- *Qualitative result selection*: We have illustrated some uncurated samples in the rebuttal PDF, demonstrating that the images generated by DomainGallery generally have good quality.
- *Possible conflicting attributes*: We have shown some examples in the rebuttal PDF, where our DomainGallery has still produced some interesting results with mixed attributes.

### Reviewer Ue4P

- *Technical challenges*: We have provided a summary of the four technical challenges in our work, and we will accordingly further clarify this part in the next version.
- *Contribution and novelty*: We have explained that no previous work recognized and tried to settle these technical challenges, therefore our DomainGallery is indeed novel and may contribute to the whole community of generative models.
- *Ablation study*: We have clarified that actually we have already conducted extensive ablation studies in Appendix B.1.

### Reviewer btQa

- *Novelty of the similarity consistency loss*: We have explained that our contribution w.r.t. this part is actually the proposed strategy constructing paired source/target latent codes, so that our method is open to a variety of regularizations not limited to the similarity consistency loss we have adopted in this work.
- *Comparison with subject-driven methods*: We have clarified that our goal is to mainly focus on domain-driven generation, while combining DomainGallery with personalization methods is just one of the promising directions and we prefer to leave this part to future works.
- *Connection to Hybrid Domain Adaptation (HDA)*: We have discussed some key differences (incl. settings, models and generation scenarios) between HDA and our DomainGallery.

### Reviewer N3qa

- *Applying DomainGallery to other subject-driven methods/T2I models*: These two are indeed promising future directions. We have respectively discussed our opinions (with some predictions on performance) towards these two kinds of potential combinations.
- *Possible limitations & qualitative comparison*: We have clarified that we have actually discussed possible limitations in Appendix C. And we have also illustrated uncurated samples in the rebuttal PDF, including some less satisfying samples. Although not yet perfect, our DomainGallery generally performs well.
- *Mixed domains*: We have shown some samples mixing two style domains in the rebuttal PDF, demonstrating that DomainGallery may produce some interesting results.

We will accordingly improve our manuscript following the suggestions from the reviewers. Again we would like to express our gratitude to their precious comments!
Thank you very much for your approval! We will accordingly complement our work with what you suggest in the next version.

If there is anywhere we can make further improvement or provide additional information, that might possibly let you consider a higher rating, please let us know.
I acknowledge and have read the author response. 

In the next version, I would like to see if the authors can improve the presentation and make it easier to understand the motivation and illustration of the proposed algorithm, esp the attribute erasure part.

Overall, I thank for the author response and would like to keep my score.
Glad to hear that all of your concerns are resolved, and thank you very much for reconsidering your rating.

We will follow your advice to include what we have discussed in the next version.
Thank you for your detailed rebuttal. I appreciate the effort you put into addressing all of my concerns. As a result, I have decided to increase my score.

I would also like to acknowledge the authors for discussing the difference with previous works and conducting additional experiments. I believe these discussions offer valuable insights and would enhance the article. Therefore, I strongly suggest including them in the camera-ready version of the paper.
Thanks for your reply, and we sincerely appreciate your support. If there is anywhere we can make further improvement or provide additional information, that might possibly let you consider a higher rating, please let us know. Thank you very much!
Thank the authors for the rebuttal. I am satisfied with the response and decide to keep my score.