Sign In

5-second embeddings and how to make them

5-second embeddings and how to make them

This article was inspired by and expands on Mr_Monster’s article “Train OCs without Images”

(https://civitai.com/articles/8748/train-ocs-without-images-or-automatic1111”), I decided to make my life easier.

Before we begin

To use this process you’ll need the Embedding Merge extension and either Forge, reForge or Automatic1111.

With me so far?

Yeah, I thought you would be ;-)

How to do it

So, go to the Embedding Merge tab, which usually hides behind two letters, namely “EM”

Here, you’ll see a large input field, and we’ll use that to describe the person or object we want to be able to prompt.

Now, because I’m a fan of women, I’ll be assuming you’ll be using this to create embeddings of women.Yu can, however, specify things like “elf ears” or “cat ears” and you will be able to create that consistently without prompting for it.

Now, describe the woman you wish to see, the more detail the better, but it has to be kept below 75 tokens. Which can be a tad troublesome, as us mere humans don’t think in tokens.

Fortunately, if your description exceeds 75 tokens, you’ll be told as soon as you press THE BIG RED BUTTON “Parse”

When you press “Parse”, you’ll be able to see what words correspond to which token, which is useful, because if you get an asterisk (*) instead of a number, it means the word has no corresponding token, and it’s a good idea to do a little editing.

Once you have it down, enter the name with which you wish to grace your embedding (aka the file name you want), and click “Parse”.

Wait about 5 seconds and your embedding is done. And, as a bonus, you get both an SD 1.5 embedding and an SDXL embedding (which also works for Pony)!!!

Location, location, location!

The embeddings will be placed in the embedding_merge folder which will be located where all your other embeddings are stored. If you have an SD1.5 checkpoint loaded when creating the embedding, the SDXL embedding will be located in a subfolder aptly named sdxl.

On the other hand, if your currently loaded checkpoint is SDXL, the SDXL embedding wilkl be in the embedding_merge folder and the SD 1.5 version will be in a subfolder named “sd1”.

This can lead to a mess, so I, for one, always have an SD 1.5 checkpoint loaded, and promptly rename the SDXL version something containing SDXL, because otherwise they’ll have the same file name.

And that’s just too confusing.

Are your bases covered?

So, in order to ensure that you’ve remembered all the elements you want, I did a little thing and made a formula for me to fill in.

I’m lazy and forgetful, so it really helps, and minimises my chances of typos.

Here’s the formula:

<gender>, <hair>, <skintone>, <eye colour and size>, <makeup>, <body>, <bust>, <age> years old "<first name> <last name>" from <country> mixed with "<celebrity name>" mixed with "<celebrity name>"

<gender> is important for the SDXL version, because for some reason it tends to not discriminate, and so makes a lot of the pictures the opposite gender of what you thought you wanted.

The <first name> and <last name> is what I want the embedding to be named. It likely, and I’m unsure of this, also mixes stuff around nicely.

<country> helps with hair colour and skin tone, and <age> tends to influence skin texture.

<celebrity name> adds consistency, but be careful whom you choose. Some celebrities, such as Emma Watson, are so over trained that she tends to take over everything and be easily recognisable, and we specifically don’t want that.

Also, make sure that the celebrity got famous before 2022, or the checkpoint has no idea who they are.

A sample

Medium-length auburn hair, rosy fair skintone, round green eyes, romantic rosy makeup, curvy body, moderate bust, 18 years old "Amélie Laurent" from France mixed with "Léa Seydoux" mixed with "Marion Cotillard."

This ends up giving us this:

https://civitai.com/models/1018380/amelie-laurant-mxai

who looks like this:

00053-tvZetaBlend-12-08122024_012936.png

Cheat mode activated!

Right, I’m going to assume that you’re lazy and suddenly devoid of ideas. Entirely unlike yours truly, of course cough.

And so we cheat. We cheat outrageously.

And we do it with ChatGPT or whatever other AI you prefer.

Simply prompt this:

Take the following and replace the everything between the < and > with what the text between them describes. Name must match the country, age must be between 18 and 45 and the celebrities gender must match <gender>

<gender>, <hair>, <skintone>, <eye colour and size>, <makeup>, <body>, <bust>, <age> years old "<first name> <last name>" from <country> mixed with "<celebrity name>" mixed with "<celebrity name>"

And so we might get this:

woman, straight black hair, deep brown skintone, almond-shaped dark brown eyes, bold dramatic makeup, athletic body, small bust, 24 years old "Aanya Patel" from India mixed with "Priyanka Chopra" mixed with "Deepika Padukone."

Easy-peasy. I usually request 10 examples.

The weakness of using ChatGPT is, of course, that the name of any pornographic actor or actress is so forbidden that even thinking of a pixel in the colour that might be mistaken as that of a nipple will cause all children to turn gay.

So, if you have local AI on your machine, it should do just fine.

I’m looking forward to see what you think of all this.

Comments and questions are most welcome.

Happy prompting!

Some more samples of embeddings created this way:

00011-tvZetaBlend-12-08122024_004714.pnghttps://civitai.com/models/1018515/sakura-hakashi-mxai

00128-photographerAlpha7_v3-9-29112024_092502.pnghttps://civitai.com/models/995735/betty-felis-mxai

00099-xenogasmNSFWSemiReal_v5-15-28112024_223031.pnghttps://civitai.com/models/990281/cithrel-faeleth-mxai

00002-tvZetaBlend-3-06122024_202307.pnghttps://civitai.com/models/1013559/nia-williams-mxai

Addendum and lessons learned

Picking an SDXL checkpoint when prompting the embedding creates a better SDXL embedding, and a very good SD 1.5 embedding in one go, with greater (albeit far from perfect) similarity between the embeddings.

Choosing an SD 1.5 checkpoint tends to make the SDXL embedding rather bland and generic.

For embeddings prompted on SDXL, with samples on bot SDXL and SD 1.5, see these:
https://civitai.com/models/1130658?modelVersionId=1288105

https://civitai.com/models/1134398?modelVersionId=1275414 (This one also has Pony samples)
and https://civitai.com/models/1141208/donna-eisenberg-mxai-sd-15-and-sdxl

...And all the others marked with "SD 1.5, SDXL and Pony" in my model library.

Happy prompting!

38

Comments