DisenBooth: Identity-Preserving Disentangled Tuning for Subject-Driven Text-to-Image Generation

Hong Chen, Yipeng Zhang, Simin Wu, Xin Wang, Xuguang Duan, Yuwei Zhou, Wenwu Zhu

Subject-driven text-to-image generation—the ability to take a few photos of your dog or a favorite toy and place it in entirely new, imaginative scenes—has become a cornerstone of personalized AI art. However, current state-of-the-art methods often suffer from a "clinging" problem: they struggle to separate the subject from its original background or pose.

At ICLR 2024, researchers from Tsinghua University and Lanzhou University presented DisenBooth, a novel fine-tuning framework that uses disentangled embeddings to ensure your subject keeps its identity without dragging its original surroundings into every new generation.

TL;DR

DisenBooth introduces a disentangled tuning strategy that separates a subject's core identity from its background and pose using two distinct embeddings. By employing novel "weak denoising" and contrastive losses, it achieves superior identity preservation and text-alignment compared to popular baselines like DreamBooth.

What Problem Does This Paper Address?

When you fine-tune a model like Stable Diffusion on 3-5 images of a specific backpack, the model often "entangles" the backpack's identity with the grass it was sitting on or the lighting of the room. This leads to two main failure modes:

  1. Overfitting: If you ask for the backpack "in the snow," the model might ignore the prompt and generate the original grass background because it thinks the grass is part of the backpack's definition.
  2. Identity Loss: In an attempt to follow the "snow" prompt, the model might change the color or shape of the backpack, losing the very identity it was supposed to preserve.

Existing methods like DreamBooth and Textual Inversion struggle to balance these two extremes because they typically use a single, entangled embedding to represent the subject.

Figure 1: Comparisons between different existing methods and our proposed DisenBooth. “a S∗ dog” is a special token that represents the subject identity. The non-finetuning method ELITE and the image editing method InstructPix2Pix struggle in preserving the subject identity. The existing finetuning method DreamBooth suffers from overfitting on the input image background (row 2 col- umn 4) and subject identity changes (row 3 column 4).

Methods

DisenBooth tackles this by splitting the learning process into two branches, as shown in the architecture below:

Figure 2: The DisenBooth framework featuring Identity-Preserving and Identity-Irrelevant branches.

1. The Dual-Branch Architecture

  • Identity-Preserving Branch: Learns a shared textual embedding ($f_s$) across all input images. This embedding is intended to capture only the "essence" of the subject (e.g., the specific features of a dog).
  • Identity-Irrelevant Branch: Extracts a unique visual embedding ($f_i$) for each individual input image using a CLIP image encoder and a learnable mask. This captures the "noise"—the specific background, pose, and lighting of that particular photo.

2. Novel Tuning Objectives

To ensure these two embeddings don't just learn the same thing, the authors introduced two auxiliary losses:

  • Weak Denoising Objective ($L_2$): The model is tasked with denoising the image using only the identity embedding $f_s$. Crucially, this is given a very low weight. This forces $f_s$ to capture the common subject identity shared across all photos without needing to perfectly reconstruct the background.
  • Contrastive Embedding Objective ($L_3$): This loss explicitly pushes the identity embedding $f_s$ and the visual embedding $f_i$ apart in the latent space, ensuring they capture different, non-overlapping information.

3. Parameter Efficiency

Instead of fine-tuning the entire U-Net (which is computationally expensive), DisenBooth uses LoRA (Low-Rank Adaptation) and a small adapter, making the process much faster and lighter.

Datasets

The researchers evaluated DisenBooth on DreamBench, a standard benchmark for subject-driven generation containing 30 subjects (ranging from pets to appliances) and 25 diverse text prompts for each. They generated a total of 3,000 images for a robust comparison against baselines.

Key Insights and Ideas

  • Disentanglement is the Key to Control: By isolating the identity-irrelevant features, the model "frees up" the generation process. When the visual embedding is discarded during inference, the model can easily apply the identity embedding to any new context provided by a text prompt.
  • The "Weak" in Weak Denoising: The authors found that if the identity branch is too strong, it starts capturing background details again. The "weak" constraint is the secret sauce that keeps the identity embedding "clean."
  • Flexible Inheritance: Because the model learns to extract identity-irrelevant features, users can actually choose to keep them. By adding a fraction of a reference image's visual embedding ($f_i$) back into the generation, a user can control exactly how much of the original pose or background they want to inherit.

Key Results

DisenBooth consistently outperformed baselines in both automated metrics and human preference studies.

Method DINO Score (Identity) ↑ CLIP-T Score (Text) ↑ Identity Avg. Rank ↓ Overall Avg. Rank ↓
DreamBooth 0.685 0.319 2.20 2.45
DisenBooth (Ours) 0.675 0.330 1.37 1.59

Note: Lower rank is better in human evaluation.

Table 1: DINO, CLIP-T, and the user preferences of different methods on DreamBench. Except the referenced model pretrained SD, we bold the method with the best performance w.r.t. each metric.

While DreamBooth has a slightly higher DINO score, the authors point out this is often due to overfitting (matching the background too closely). DisenBooth’s higher CLIP-T score and significantly better human ranking prove that it follows text prompts much better while keeping the subject recognizable.

Figure 3: Generated images of the can given different text prompts with different methods.

Limitations and Future Work

The authors acknowledge two main limitations:

  1. Base Model Constraints: As a fine-tuning method, DisenBooth is still limited by the underlying capabilities of Stable Diffusion.
  2. Coarse Disentanglement: Currently, the model only separates "identity" from "everything else." Future work could aim for more fine-grained control, separating pose, lighting, and background into their own individual "knobs" for even more precise image editing.

Summary updated

Abstract

Subject-driven text-to-image generation aims to generate customized images of the given subject based on the text descriptions, which has drawn increasing attention. Existing methods mainly resort to finetuning a pretrained generative model, where the identity-relevant information (e.g., the boy) and the identity-irrelevant information (e.g., the background or the pose of the boy) are entangled in the latent embedding space. However, the highly entangled latent embedding may lead to the failure of subject-driven text-to-image generation as follows: (i) the identity-irrelevant information hidden in the entangled embedding may dominate the generation process, resulting in the generated images heavily dependent on the irrelevant information while ignoring the given text descriptions; (ii) the identity-relevant information carried in the entangled embedding can not be appropriately preserved, resulting in identity change of the subject in the generated images. To tackle the problems, we propose DisenBooth, an identity-preserving disentangled tuning framework for subject-driven text-to-image generation. Specifically, DisenBooth finetunes the pretrained diffusion model in the denoising process. Different from previous works that utilize an entangled embedding to denoise each image, DisenBooth instead utilizes disentangled embeddings to respectively preserve the subject identity and capture the identity-irrelevant information. We further design the novel weak denoising and contrastive embedding auxiliary tuning objectives to achieve the disentanglement. Extensive experiments show that our proposed DisenBooth framework outperforms baseline models for subject-driven text-to-image generation with the identity-preserved embedding. Additionally, by combining the identity-preserved embedding and identity-irrelevant embedding, DisenBooth demonstrates more generation flexibility and controllability
BibTeX
@inproceedings{chen2024disenbooth,
  author = {Hong Chen and Yipeng Zhang and Simin Wu and Xin Wang and Xuguang Duan and Yuwei Zhou and Wenwu Zhu},
  title = {{DisenBooth: Identity-Preserving Disentangled Tuning for Subject-Driven Text-to-Image Generation}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=FlhjUkC7vH},
}
Figure