Sign In

SD Basics - A guide to Textual inversion

SD Basics - A guide to Textual inversion

This guide will not teach you how to create your own Textual Inversion model, but how to use and install them.

What Is It?

Similar to LoRAs, Textual Inversion is a way to teach Stable Diffusion models new concepts. Explaining briefly, they are a bunch of keywords on a file that you can call in the prompts, then creating an output based on it (very similar to how LoRAs are called in the prompt).

To simplify, let's say you create a text file with all the characteristics of Adam Sandler in format of keywords, so something like “black hair, white skin, funny, very funny, extremely funny, hilarious, etc”. Then you name that text file “PerfectCreation”, go into your webui, and place it on your prompt just like a normal word. Now you've created the concept PerfectCreation and every time you calls it, Stable Diffusion will have outputs that look a lot like Adam Sandler.

You can also put it on the negative prompts, just in case you do not want Adam Sandler on your outputs, but no sane soul on Earth would ever do that.

Image credits

Must-Have

For better generations overall, some Textual Inversions (mainly used on negative prompts) are pretty common, these are some I'd recommend. (how to install on next step)

How to Install

First of all, find a model you'd like to install, CivitAI has plenty of them. For this guide, I'd recommend you to just choose one of the models I listed above to get started.

For this installation method, I'll assume you're using AUTOMATIC1111 webui.

Follow the step-by-step:

  1. Download the Textual Inversion file

  2. Go to your webui directory (“stable-diffusion-webui” folder)

  3. Open the folder “Embeddings”

  4. Paste the file you downloaded in there

Just like that, you're ready to go! :)

How to Use

You just need to call the file name in the prompt, just like you would type a keyword normally.

So, downloading the EasyNegative Textual Inversion, I get the “easynegative.safetensors” file, and after that I can call it typing “easynegative” on the prompt.

PS: EASYNEGATIVE IS INTENDED TO BE A NEGATIVE PROMPT, DON'T PUT IT ON THE NORMAL PROMPT AREA, OTHERWISE YOUR GENERATIONS WILL LOOK HORRIBLE!

So let's say I want to create a cool warrior generation:

Prompt: Cool, Strong Warrior, Medieval background, realistic

Negative prompt: easynegative, cartoon, anime

That's the basics for Textual Inversion!
Thanks for reading.

Consider following my work on Twitter

35

Comments