SingleInsert: Inserting New Concepts from a Single Image into Text-to-Image Models for Flexible Editing

Zijie Wu, Chaohui Yu, Zhen Zhu, Fan Wang, Xiang Bai · DOI

Introduction

Personalizing text-to-image (T2I) models like Stable Diffusion has traditionally required multiple reference images (typically 3–5) to accurately capture a new concept, such as a specific person's face or a unique object. However, in many real-world scenarios, only a single reference image is available. Existing methods for single-image inversion often struggle with two major issues: foreground-background entanglement and language drift.

Entanglement occurs when the model learns the background of the reference image as part of the new concept, making it difficult to place the subject in new contexts. Language drift happens when fine-tuning causes the model to lose its general understanding of a category (e.g., "a face"), biasing it entirely toward the specific instance it is learning. SingleInsert addresses these challenges through a novel two-stage framework designed for high-fidelity and highly editable concept insertion.

Methodology: A Two-Stage Approach

SingleInsert employs a structured process to disentangle the subject from its environment while refining the model's internal representation.

Stage I: Disentangled Inversion

The first stage focuses on finding an optimal text embedding for the new concept. To prevent the model from learning the background, SingleInsert utilizes masks (generated by GroundingDINO and SAM) to apply a Foreground Loss ($L_{fg}$), ensuring reconstruction accuracy only for the subject. Crucially, the authors introduce a Background Loss ($L_{bg}$). This loss penalizes the learned embedding if it significantly affects the background pixels, effectively forcing the embedding to represent only the foreground subject.

Stage II: High-Fidelity Fine-tuning

While the embedding captures the core concept, fine details are often missed. Stage II uses Low-Rank Adaptation (LoRA) to fine-tune the T2I model weights. To combat language drift, the authors implement a Semantic Loss ($L_{sm}$). This loss ensures that the fine-tuned model's output for a general class prompt (like "a face") remains close to the original model's output. This preserves the model's broad "prior" knowledge while allowing it to learn specific identity details.

Key Results and Applications

SingleInsert demonstrates superior performance compared to established baselines like Textual Inversion and DreamBooth, particularly in its ability to follow complex text prompts while maintaining subject identity.

SingleInsert demonstrates versatile editing capabilities, including single concept generation, novel view synthesis, and multiple concept composition from a single reference image.

Quantitative Performance

The method achieves high visual resemblance, evidenced by a CLIP-I-f score of 0.857 and a DINO-f score of 0.609. More importantly, it excels in editability. Using the Editing Success Rate (ESR)—a metric designed to measure adherence to complex instructions—SingleInsert reached a score of 0.845, significantly outperforming Textual Inversion (0.695) and DreamBooth (0.515).

Versatile Editing

The framework enables several advanced applications:

  • Novel View Synthesis: Generating accurate side or back views from a single frontal image.
  • Zero-Shot Composition: Combining multiple independently learned concepts (e.g., a specific face, hair, and clothing) into a single scene without needing joint training.
  • Attribute Editing: Placing a specific identity into diverse artistic styles or onto different objects (e.g., a "Funko Pop" version of a person).

Conclusion and Future Work

SingleInsert provides a robust solution for single-image personalization by explicitly addressing the background entanglement problem. By separating the learning of the embedding from the refinement of the model, it achieves a better balance between fidelity and editability than previous methods.

Current limitations include difficulties with rare object classes that the base model lacks prior knowledge of, and challenges in synthesizing extreme perspective shifts from a single 2D view. Future research may focus on enhancing the model's underlying priors or incorporating geometric constraints to better handle these edge cases.

Summary updated

BibTeX
@misc{wu2023singleinsert,
  author = {Zijie Wu and Chaohui Yu and Zhen Zhu and Fan Wang and Xiang Bai},
  title = {{SingleInsert: Inserting New Concepts from a Single Image into Text-to-Image Models for Flexible Editing}},
  year = {2023},
  eprint = {2310.08094},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2310.08094},
}
Figure