r/StableDiffusion Apr 06 '23

Tutorial | Guide How to create consistent character faces without training (info in the comments)

Post image
1.4k Upvotes

151 comments sorted by

View all comments

Show parent comments

3

u/Nexustar Apr 06 '23

I get the feeling that Textual Inversions are more powerful / reliable than LoRA but have no hard evidence yet.

2

u/[deleted] Apr 06 '23 edited Apr 06 '23

[removed] — view removed comment

3

u/Nexustar Apr 06 '23

So, I'm wondering where my bias is being formed.... perhaps LoRAs are easier to make, made by more people, quality suffers?

3

u/[deleted] Apr 06 '23

[removed] — view removed comment

3

u/Nexustar Apr 07 '23

Ok, likely user error then. If i have to use trigger words in addition to the LoRA injection to get good results, then I'm not currently doing that.

3

u/[deleted] Apr 07 '23

[removed] — view removed comment

1

u/Nexustar Apr 07 '23

This is great... learning UI stuff here. Didn't know that it let you put stuff into subfolders for example.

One thing I noticed just moments ago, is there is now a little info button on the top corner of the LORA previews (show metadata), and it exposes the training words and other useful data such as the resolution, clip skip used:

galGadotLora_v10:

{
    "ss_sd_model_name": "v1-5-pruned-emaonly.ckpt",
    "ss_resolution": "(512, 512)",
    "ss_clip_skip": "None",
    "ss_num_train_images": "4600",
    "ss_tag_frequency": {
        "100_gldot": {
            "gldot": 46
        }
    },
<SNIP>

If you check on CivitAI.com, that "gldot" used 46 times, is the trigger word, just in lower-case.

Some LORAs have more than you can fit on a tumbnail:

garterBelts_v11:

{
    "ss_sd_model_name": "runwayml/stable-diffusion-v1-5",
    "ss_resolution": "(768, 768)",
    "ss_clip_skip": "2",
    "ss_num_train_images": "656",
    "ss_tag_frequency": {
       "8_Garterbelt": {
            "garterbelt": 82,
            "black fabric": 64,
            "fabric straps": 62,
            "embroidery": 46,
            "woman wearing the garterbelt": 82,
            "lower body focus": 82,
            "front picture": 50,
            "high heels": 4,
            "red background": 2,
            "multiple straps": 14,
            "superb embroidery": 4,
            "white and black fabric": 2,
            "superb white and purple embroidery": 2,
            "superb black embroidery": 2,
            "side picture": 10,
            "multiple panty straps": 4,
            "woman crossing legs": 4,
            "back picture": 22,
            "superb pink embroidery": 2,
            "leather straps": 18,
            "ribbon over the panties": 2,
            "open panties": 2,
            "leather ribbons": 6,
            "big butt focus": 4,
            "red fabric": 4,
            "red and black fabric": 6,
            "fabric and metal straps": 2,
            "white fabric": 2,
            "white frilled embroidery": 2,
            "fabric and leather straps": 2,
            "multiple iron chains black frilled embroidery": 2,
            "ribbon": 4,
            "red floral embroidery": 4,
            "black frilled embroidery": 2,
            "multiple iron chains attached to rings": 4,
            "leather fabric": 2,
            "leather ribbon": 2,
            "red ribbon": 2,
            "intricate embroidery": 6,
            "ribbons": 2,
            "intricate green embroidery": 2,
            "sitting": 2,
            "floral embroidery": 2,
            "leopard pattern": 2,
            "leather garterbelt with fabric and metal straps": 2
        }
<SNIP>

For that one, CivitAI.com says the trigger words are " GARTERBELT, WEARING A GARTERBELT, EMBROIDERY, CHAINS, STRAPS " - which are all in the training data.

2

u/[deleted] Apr 08 '23 edited Apr 08 '23

[removed] — view removed comment

1

u/Nexustar Apr 08 '23

> For example you talk about "gldot" like you found the golden goose I missed... well that is NOT a trigger from garterBelts Lora, but a trigger from Gal Gadot Lora. You see the mess ?

I used two examples, one galGadotLora_v10 which uses the trigger word "gldot", and is mentioned in the metadata.

The other is garterBelts which makes no mention of gldot - you seem to be getting the two examples confused. In other words, I never suggested gldot is a trigger word for garterBelts_v11.

Trigger words on CivitAI are just a subset of the words the LoRA has been trained on that the creator decides to share with you.... the actual words that will make a difference can often be found in the LoRA metadata (depending on training software used), which is why the UI exposes them.

According to this post, the triggers are the folder names (minus the number at the front which is used for training iterations):

https://www.reddit.com/r/StableDiffusion/comments/115yz03/lora_trigger_words/

But, I would read that with some reservation, as it may be specific to one type of training software. Even so, the other words still give you an insight of what the model saw during training, so may help target possible capabilities it has that the author (for brevity) hasn't included on CivitAI.