9
Using Textual Inversion
Textual inversion (TI) is another way to provide additional capabilities to a pretrained model. Unlike Low-Rank Adaptation (LoRA), discussed in Chapter 8, which is a fine-tuning technique applied to the text encoder and the UNet attention weights, TI is a technique to add new embedding space based on the trained data.
In the context of Stable Diffusion, text embedding refers to the representation of text data as numerical vectors in a high dimensional space, allowing for manipulation and processing by machine learning algorithms. Specifically, in the case of Stable Diffusion, text embeddings are typically created using the Contrastive Language-Image Pretraining (CLIP) [6] model.
To train a TI model, you only need a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access