How to Install Embeddings (Textual Inversion) Models in ComfyUI

The Principle of Embeddings (Textual Inversion) Models

Imagine you have a huge toy box filled with all sorts of toys, from tiny Lego blocks to big teddy bears. However, the toy box is too messy, and every time you want to find a specific toy, such as your blue toy car, you have to go through the entire box, which is very time-consuming.

The Role of Embeddings Models

Embeddings models are like giving each toy in the toy box a special label. This label is not the name of the toy, but a special code that can quickly tell you what the toy is, its color, size, shape, and so on. This way, when you want to find your blue toy car, you only need to remember its special code, and you can quickly find it in the toy box.

The Principle of Embeddings Models

The principle of embeddings models is like converting toys into a special code. This process is called "embedding". It uses a mathematical method to convert each toy (here, toys represent data, such as pictures, text, etc.) into a list of numbers. This list is like the "fingerprint" of the toy, containing all the important information of the toy.

Why Use Embeddings Models

There are several benefits to using embeddings models:

  1. Fast Retrieval: Just like remembering the code of a toy can quickly find the toy, embeddings models can help computers quickly find and process data.
  2. Save Space: Embeddings models can convert complex data into smaller lists of numbers, which can save storage space.
  3. Easy to Process: Lists of numbers are easier for computers to process because computers are naturally good at processing numbers.

Through embeddings models, computers can more efficiently process large amounts of data, whether in the fields of image recognition, speech recognition, or natural language processing.

The Role of Embeddings (Textual Inversion) Models

Used to embed specific element characteristics in images, such as picture style, character features, scene features, etc., so that the model generates images that conform to these characteristics.

Where Can I Download Embeddings (Textual Inversion) Models?

Most AI image generator communities provide model downloads, and you can quickly find models of this type by filtering for Embeddings / Textual Inversion on the corresponding website.

As shown in the figure below, when filtering models on civitai (opens in a new tab), select Embeddings to filter out embedding models.

civitai_filters

How to Install Embeddings (Textual Inversion) Models?

Store the downloaded model in the "ComfyUI\models\embeddings" directory, and then restart or refresh the ComfyUI interface to load the corresponding embedding model.

💡

Because models need to be distinguished by version, for the convenience of your later use, I suggest you rename the model file with a model version prefix such as "SD1.5-Model Name", or do not rename, and create a new folder in the corresponding model directory, named after the major model version such as "SD1.5", and then copy your model files to "ComfyUI_windows_portable\ComfyUI\models\embeddings\SD1.5"

If you are sharing model files with other GUIs, please refer to the shared model section in installing comfyui, and copy the corresponding model files to the corresponding folder.

How to Use Embeddings Models in ComfyUI?

Embeddings trigger words (trigger words), usually on the detail introduction page of the Embeddings model, there will be trigger words, usually you just need to enter the corresponding prompt in the prompt to trigger the effect of Embeddings, but remember that it is often difficult to remember the trigger words of many models, you can also directly enter "embedding: model file name" such as "embedding:EasyNegative," in the "CLIPTextEncode" to use the model.

In addition, Embeddings are also divided into using in positive prompt words and using in negative prompt words, and vice versa, for specific usage, please refer to the detail introduction page of the corresponding model.

  • Related ComfyUI nodes
CLIP Text Encoder CLIPTextEncode

Recommended Embeddings Models

I have updated some recommended Embeddings on the following page, you can download according to your needs.

Stable Diffusion Lora Model Recommendations