Source-linked AI summary

An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversion

Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patashnik, Amit H. Bermano, Gal Chechik, Daniel Cohen-Or

arXiv:2208.01618v1cs.CVcs.CLcs.GRcs.LG

TL;DR

Existing text-to-image models do not clearly support faithful generation and editing of specific user concepts in new scenes. The paper learns a pseudo-word from 3–5 images in a frozen model’s embedding space, and reports faithful concept portrayal across applications with strong editing flexibility. Its main limitations are imprecise shape learning and roughly two-hour optimization per concept.

  • Problem

    It is unclear how language-guided models can generate specific unique concepts, modify their appearance, or compose them in novel roles and scenes.

  • Method

    Textual Inversion optimizes a single pseudo-word embedding from 3–5 images of a user-provided concept while keeping the pre-trained text-to-image model fixed.

  • Results

    The method more faithfully portrays concepts across applications and tasks, with comparable reconstruction quality and improved editability over multi-word baselines.

  • Takeaways & Limitations

    Pseudo-words can be composed into natural-language prompts for intuitive personalized creation and modification in new scenes.

  • Takeaways & Limitations

    The method may struggle to learn precise shapes, and learning one concept requires roughly two hours in the reported setup.

Abstract

from arXiv · show

Text-to-image models offer unprecedented freedom to guide creation through natural language. Yet, it is unclear how such freedom can be exercised to generate images of specific unique concepts, modify their appearance, or compose them in new roles and novel scenes. In other words, we ask: how can we use language-guided models to turn our cat into a painting, or imagine a new product based on our favorite toy? Here we present a simple approach that allows such creative freedom. Using only 3-5 images of a user-provided concept, like an object or a style, we learn to represent it through new "words" in the embedding space of a frozen text-to-image model. These "words" can be composed into natural language sentences, guiding personalized creation in an intuitive way. Notably, we find evidence that a single word embedding is sufficient for capturing unique and varied concepts. We compare our approach to a wide range of baselines, and demonstrate that it can more faithfully portray the concepts across a range of applications and tasks. Our code, data and new words will be available at: https://textual-inversion.github.io

1 Introduction

The paper introduces personalized text-to-image generation by learning pseudo-words for user-provided concepts while keeping the generative model frozen. These pseudo-words can be composed with natural-language prompts to create and edit concepts across novel scenes and styles.

  • The learned pseudo-word can be inserted into natural-language queries to place a concept in new scenes, styles, poses, or compositions while leaving the generative model untouched.
  • Textual Inversion optimizes a single word embedding from a fixed model and a small 3–5-image concept set to reconstruct the provided images.
  • The approach works across unique objects and prompts, including scene insertion, style transformation, pose transfer, bias reduction, and product imagination.
  • Personalized text-to-image generation synthesizes novel scenes containing user-provided concepts under natural-language guidance.
  • The method learns new pseudo-words in a text encoder’s embedding space to capture high-level semantics and fine visual details.
  • Against user-caption and multi-word baselines, the embeddings provide higher visual fidelity, more robust editing, and comparable reconstruction quality with a single word.

2 Related work

The related work spans text-guided synthesis, personalization, GAN and diffusion inversion, and text embeddings. This paper instead expands a frozen text-to-image model’s vocabulary with pseudo-words representing user-provided concepts for intuitive editing.

  • Text-guided synthesis uses conditional GAN, autoregressive, and diffusion models to generate images from captions.
  • Unlike approaches that train new models, this method expands a frozen model’s vocabulary with pseudo-words describing specific concepts.
  • GAN inversion typically finds a latent representation through optimization or an encoder, whereas this work follows optimization to better adapt to unseen concepts.
  • Diffusion inversion generally maps a given image into latent space, while this approach inverts a user-provided concept into a pseudo-word for more general editing.
  • Personalization methods commonly tune generative models to reconstruct specific faces or scenes.

3 Method

The method learns user-specific concepts in the word-embedding space of a frozen text-to-image model, enabling those concepts to be composed in natural-language prompts. It applies textual inversion to a small image set while preserving the model’s text encoder and denoising network.

  • The approach encodes user-specified concepts into an intermediate representation so the model’s semantic and visual prior can guide transformations.
  • The method searches the text encoder’s continuous word-embedding space because it is directly optimizable and can represent new pseudo-words.
  • Unlike prior semantic objectives, textual inversion learns pseudo-words with a visual reconstruction objective to capture concept appearance.
  • The method is implemented over latent diffusion models, whose pipeline denoises latent image codes and decodes them into images.
  • A placeholder S∗ is replaced by a learned embedding v∗, allowing the new concept to appear in composed sentences like an ordinary word.
  • Given typically 3-5 concept images, the method directly optimizes v∗ against the LDM loss using neutral context prompts while keeping cθ and ϵθ fixed.

4 Qualitative comparisons and applications

The paper evaluates Textual Inversion across object reconstruction, text-guided composition, style representation, multi-concept synthesis, and bias reduction. Across these applications, learned pseudo-words preserve personalized concepts while supporting new prompts, though relational composition remains limited.

  • 4.1 Image variations: Textual Inversion better captures unique object details than human captions and image-guided DALLE-2 in reconstruction variations.Human captions often omit fine features, while DALLE-2 struggles with details of personalized objects unfamiliar to its image encoder.
  • 4.2 Text-guided synthesis: A single learned pseudo-word can preserve a concept while enabling generations in new styles, scenes, and object configurations.The frozen model jointly reasons over the learned concept and its prior knowledge, supporting prompts such as paintings, mosaics, and altered materials.
  • 4.2 Text-guided synthesis: Compared with alternative personalized creation approaches, the method more accurately preserves subjects and generalizes one optimized pseudo-word across many new texts.The baselines require expensive test-time optimization for each new creation, whereas the learned pseudo-word is reusable.
  • 4.3 Style transfer: Textual Inversion represents abstract concepts such as an artist’s style, allowing style-guided generation without requiring the content of an input image to remain fixed.The method learns a pseudo-word from a small set of images sharing a style and uses prompts such as “A painting in the style of S∗”.
  • 4.4 Concept compositions: The model can combine multiple learned pseudo-words, but struggles with relational prompts such as placing two concepts side-by-side.The authors hypothesize that training only on single-concept scenes contributes to this limitation.
  • 4.5 Bias reduction: Learning pseudo-words from small, carefully curated datasets can reduce pretrained bias, increasing perceived gender and ethnic diversity in generated images.The paper demonstrates this intervention for the biased concept “Doctor”.

5 Quantitative analysis

The evaluation compares reconstruction and editability across inversion setups, showing that a single learned pseudo-word provides a strong balance between both objectives. Results also reveal a controllable distortion–editability trade-off and limitations of human captioning and CLIP-based reconstruction metrics.

  • Evaluation criteria: The evaluation measures reconstruction quality and editability using CLIP-space similarity across generated samples and textual editing prompts.Editing prompts vary from background changes to style changes and compositional scenes.
  • Evaluation setups: Reference baselines include Image Only, which copies the training set, and Prompt Only, which follows prompts while ignoring the personalized concept.Additional comparisons include multi-vector, progressive, regularized, per-image-token, and human-caption setups.
  • Results: The single-word method matches many baselines in semantic reconstruction while substantially improving editability over multi-word baselines.These results support capturing new concepts with high accuracy using a single pseudo-word.
  • Results: Embeddings exhibit a distortion–editability trade-off: closer proximity to the learned word distribution improves editing but reduces target detail, while larger deviations do the reverse.Changing the learning rate moves the single-embedding model along this trade-off curve.
  • Results: Human descriptions fail to capture concept likeness and produce diminished editability compared with the learned single-token representation.The authors relate this to selective similarity, where models may focus on only some caption tokens.
  • Limitations: CLIP reconstruction scores comparable to randomly sampled real images should be interpreted cautiously because CLIP is less sensitive to shape preservation.The user study broadly aligns with the CLIP-based reconstruction–editability trade-off.

6 Limitations

The method may struggle to reconstruct precise shapes and requires lengthy optimization, limiting its suitability for precision-demanding applications and rapid concept setup.

  • Reconstruction accuracy: The method may struggle with precise shapes because it can capture a concept’s semantic essence rather than its exact form.The authors view this as often sufficient for artistic creation but seek greater reconstruction accuracy for precision-demanding tasks.
  • Optimization time: Learning a single concept requires roughly two hours with the reported setup, making optimization time a practical limitation.The authors suggest training an encoder to map image sets directly to textual embeddings as a possible acceleration.

7 Social impact

The paper identifies risks involving disinformation, inherited dataset biases, and copyright infringement from personalized generation and style learning.

  • Disinformation: Personalized generation could support more convincing forged images, although the current model does not preserve identity enough for this concern.The paper frames misleading content and disinformation as risks of text-to-image models generally.
  • Bias: Because the underlying models inherit training-data biases, personalized generation may exhibit gender, racial, cultural, and relationship biases.More precise concept descriptions may also help reduce some such biases.
  • Copyright: Learning artistic styles may enable copyright infringement when users train on artists’ images without consent and generate similar work.The paper notes that future infringement could become difficult to detect or legally pursue.

8 Conclusions

Textual Inversion enables personalized, language-guided generation by encoding user concepts as pseudo-words in a pretrained text-to-image model. These representations support intuitive scene editing while retaining the model’s broader visual and textual capabilities.

  • Conclusion: The paper introduces personalized, language-guided generation for creating specific concepts in novel settings and scenes.The task combines user-provided visual concepts with natural-language control.
  • Conclusion: Textual Inversion encodes concepts as new pseudo-words within the textual embedding space of a pretrained text-to-image model.The pseudo-words can be inserted into natural-language descriptions for intuitive modifications.
  • Conclusion: The approach was implemented on LDM without relying on architecture-specific details, suggesting applicability to additional larger-scale text-to-image models.The authors anticipate possible improvements in text-to-image alignment, shape preservation, and generation fidelity.
  • Conclusion: The authors position personalized generation as potentially useful for artistic inspiration and product design.These applications are presented as future downstream opportunities.

Supplementary Materials An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversion

The supplementary materials identify the paper’s authors and their affiliations with Tel-Aviv University and NVIDIA.

  • The paper lists Rinon Gal, Yuval Alaluf, Yuval Atzmon, Or Patashnik, Amit H. Bermano, Gal Chechik, and Daniel Cohen-Or as authors.
  • The authors are affiliated with Tel-Aviv University and NVIDIA.

A Additional inversion approaches

The supplementary analysis evaluates bipartite inversion and pivotal tuning as alternatives for improving reconstruction, revealing trade-offs between reconstruction, structure preservation, and editability.

  • Bipartite inversion: Bipartite inversion finds a latent noise vector that reconstructs a target image while allowing later text-based semantic changes with the noise fixed.
  • Bipartite inversion: The authors adapt bipartite inversion by finding a pseudo-word, computing image-specific noise with “A photo of S∗”, and modifying conditioning text while keeping noise frozen.
  • Pivotal tuning: Pivotal tuning first optimizes a pseudo-word, then fine-tunes the generator to reconstruct concept-specific training images more accurately.
  • Bipartite inversion: At high guidance scales, bipartite inversion preserves less structure for complex prompts, while lower scales preserve structure but do not match prompts well.
  • Pivotal tuning: Naïve pivotal tuning improves shape preservation but causes severe editing collapse at high guidance scales.
  • Pivotal tuning: The authors leave more involved combinations of these approaches for future work because they might overcome the observed issues.

B Effect of training set size

The supplementary study varies the number of concept images and finds that additional images can harm editability, with the method performing best at five images.

  • The study evaluates training-set sizes ranging from one image to 25 samples for a headless sculpture concept.
  • Additional images produce embeddings farther from real-word embeddings, which harms editability.
  • The method operates best when provided with 5 images.

C Additional results

Additional experiments show personalized synthesis across varied prompts and concept galleries, while exposing variable quality, prompt matching, and difficult relational cases.

  • Additional text-guided synthesis results demonstrate personalized generation using the method.
  • Uncurated galleries include object variations generated with “A photo of S∗” and images produced using diverse context prompts.
  • Quality and prompt matching vary within the samples, and the galleries include typical failures such as difficult relational prompts.
  • The context prompts vary concepts across styles, compositions, objects, scenes, and artistic references.
  • A batch size of 16 is typically sufficient to obtain several good samples from context prompts.
  • The supplementary materials list text templates used to optimize a pseudo-word, including photo, rendering, cropping, lighting, and cleanliness prompts.
Loading 2208.01618v1…