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:
- 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.
- 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.
Methods
DisenBooth tackles this by splitting the learning process into two branches, as shown in the architecture below:
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.
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.
Limitations and Future Work
The authors acknowledge two main limitations:
- Base Model Constraints: As a fine-tuning method, DisenBooth is still limited by the underlying capabilities of Stable Diffusion.
- 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