TL;DR
Cones 2 introduces a highly efficient method for generating images that feature multiple user-specified subjects—such as a specific pet and a favorite mug—without the need to retrain models for every new combination. By representing subjects as "residual embeddings" and utilizing simple layout boxes to guide spatial attention, the researchers achieve state-of-the-art multi-subject synthesis with a minimal storage footprint (kilobytes instead of gigabytes).
The Challenge of Multi-Subject Customization
Personalizing text-to-image models like Stable Diffusion has gained significant traction through methods such as DreamBooth. However, these techniques often falter when tasked with placing multiple custom subjects into a single cohesive scene.
Two primary hurdles exist:
- The Scalability Wall: Most current methods rely on "joint training," requiring the model to be fine-tuned on all subjects of interest simultaneously. If a user has ten custom subjects and wants to generate various pairs, the number of required models grows exponentially.
- Attribute Confusion: When generating two similar subjects (e.g., two different dogs), the model frequently becomes confused. It may bleed the visual features of one subject onto the other or fail to render one of the subjects entirely.
Proposed Methods
The authors of Cones 2 tackle these issues using a two-pronged approach:
1. Residual Token Embeddings
Instead of fine-tuning the entire U-Net or learning a brand-new word from scratch, Cones 2 learns a residual ($\Delta^{custom}$) that is added to the base category embedding (e.g., the word "dog").
- The "Plugin" Concept: The text encoder is fine-tuned on a specific subject using a "text-embedding-preservation loss." This ensures that modifications are strictly isolated to the subject's token.
- Mathematical Shift: By calculating the mean difference between the tuned and original embeddings across 1,000 generated captions, the authors derive a single vector that "shifts" a generic category to a specific subject. This vector is incredibly small—just a float32 array—making it a highly portable "plugin" for that subject.
2. Layout Guidance
To resolve attribute confusion, the paper employs Layout Guidance during the inference (generation) stage.
- Attention Rectification: Users provide simple bounding boxes for each subject. The model then modifies the cross-attention maps—the internal mechanism dictating which pixels correspond to which words.
- Strengthen & Weaken: The system strengthens the activation of a specific token (like "dog") inside its designated bounding box and weakens it everywhere else. This spatial constraint prevents features from leaking into adjacent areas.
Datasets and Evaluation
The researchers evaluated their method using a diverse set of 15 customized subjects sourced from previous benchmarks, including DreamBooth and Textual Inversion.
The dataset included:
- Two scenes (e.g., a specific barn).
- Five pets (various dogs and cats).
- Eight objects (teapots, mugs, sunglasses, etc.).
These subjects were tested in increasingly difficult combinations, progressing from single-subject generations to complex scenes containing up to six distinct subjects.
Key Insights
- Embeddings are Sufficient: A major takeaway is that changing the weights of the image-generating U-Net is unnecessary for high-fidelity customization. A precise shift in the text embedding space is enough to "steer" the pre-trained model toward a specific instance.
- Spatial Separation Cures Confusion: Attribute confusion is not necessarily a failure of the model's "memory" but rather a failure of the attention mechanism to keep subjects isolated. Manually "rectifying" these attention maps using layouts eliminates this interference.
- Zero-Tuning Composition: Because the residuals are isolated, they can be linearly combined. A residual for "Dog A" and another for "Sunglasses B" can simply be added to the prompt embedding at runtime with zero additional training.
Key Results
Cones 2 outperformed heavyweights like DreamBooth and Custom Diffusion across several metrics:
- Storage Efficiency: While DreamBooth requires approximately 3.3 GB per subject combination, Cones 2 only needs about 4.8 KB per subject.
- Success Rate: In user studies, Cones 2 was the preferred method for multi-subject tasks. For four-subject generation, it achieved a 77.35% text alignment score, significantly surpassing DreamBooth's 36.42%.
- Identity Preservation: Qualitative results demonstrate that even with highly similar subjects (e.g., two different Golden Retrievers), Cones 2 successfully maintains their unique identities without blending them.
Limitations and Future Work
- Base Model Constraints: The method remains bound by the inherent capabilities of the base model (e.g., Stable Diffusion). If the base model struggles to render a specific complex pose, Cones 2 cannot artificially correct it.
- Subject Limit: Quality begins to degrade when attempting to compose more than six subjects in a single image, as the attention maps become overly crowded.
- Layout Dependency: Users must provide a layout that is "roughly consistent" with the text description. Conflicting prompts and layouts (e.g., prompting "a dog on a chair" but placing their bounding boxes on opposite sides of the image) may produce artifacts.
Future work could involve automating the layout generation process or applying this residual approach to larger, more powerful foundation models.
Summary updated