Home Artists Posts Import Register

Content

INDEX:
SD Character LoRA Training Tutorial (Part 01 - Installation)
SD Character LoRA Training Tutorial (Part 02 - Preparation)
SD Character LoRA Training Tutorial (Part 03 - Image Gathering and Tagging)

This part is to guide you to test your model and see if it's working properly.

First you should move your model to your LoRA folder. There are 2 ways of testing, some people use Additional Network extension (me too) and some people use the textual name. I'll give the example with text prompt, but it's a bit more comfy using additional network to test.

So open your output_dir folder and copy or move your epochs to your stable-diffusion-webui\models\Lora folder. I suggest you create a folder for that model test. So in my case I will create a lily_enstomach folder.

Now to stable diffusion webui. Select a checkpoint that isn't too strong in style and it's based on anime style. I'll use AnythingV5 this time.

For base prompt without too much corrections so we can see the problems more often I will use these prompts:
Positive: (masterpiece), best quality,
Negative:  blurry, jpeg artifacts, cropped, normal quality, jpeg artifacts, (worst quality:1.4, low quality:1.4), bad anatomy

Now we can insert the tags related to the girl. It's okay for a first test that we don't include too many things from ther clothes. But for speeding things up I will go in to one of the image text files and copy the prompts from there.

Copy that into your positive prompt after (masterpiece), best quality. So it will be:
(masterpiece, best quality, lily enstomach, 1girl, solo, long hair, breasts, smile, skirt, large breasts, navel, cleavage, jewelry, medium breasts, earrings, midriff, crop top, suspenders, grass.

Now another thing that you should include is the <lora:lily_enstomach:1.0> tag.

In my case I will include the tag <lora:lily_enstomach-000001:1> which is the first epoch with weight 1.

Notice that you don't need comma before the lora, and you can activate multiple loras that way without commas. But in this case we want a comma because of how X/Y/Z plot works.

Okay, now before generating anything, we should setup a way to test multiple epochs. We have 15 of them, changing the name each time would be a pain. So down on the left, go to the bottom of your screen and fin "Scripts". Select X/Y/Z Plot. Like this:

On the X Type, change it to Prompt S/R.

Then on the X values copy the <lora> prompt in there. Like this:

Then you should include the other loras separate by commas, Like this:

Now, leave the generation configs as usual, 512x512, 20 steps, euler a. It doesn't matter too much for now. Our goal now is to exclude the obivous bad models. So no need for highres fix. Generate 1-2 images from the Batch Count. I will generate 2 just to be sure.

You can see that the first ones are obviously wrong, so I can remove them from the test.

Things start to get right from 6 and on. 6 Is probably too weak, but I can run more tests with it. The key now is to understand what models are overfit and what is not.

The second test that I usually do is a close up of their face. This time I usually test with high resolution fixes so I can see if the details are in there. It's usually a good idea to test a different expression.

Like this prompt: (masterpiece), best quality, lily enstomach, 1girl, solo, low ponytail, portrait, close up, surprised, :O <lora:lily_enstomach-000006:1>

Remember to change the prompt with your current lora and remove the unused loras from the X/Y/Z plot.

She is capable of reproducing the expression, but you can see her skin color not being too strong in those initial epochs, right? It feels like it's getting right at around 10+. So I will exclude the others because the skin color should be something that gets right more constantly.

Now since the face was okay most of the time, we should test show she is in a realistic LoRA or a semi-realistic. Because that way we can feel when the style is too strong.

Testing with cosplaymix_20. Changing the prompts a bit to:

Positive: natural lighting, realistic, lily enstomach, 1girl, solo, long hair, breasts, smile, skirt, large breasts, navel, cleavage, jewelry, medium breasts, earrings, midriff, crop top, suspenders, grass <lora:lily_enstomach-000010:1>

Negative: raw photo, blurry, jpeg artifacts, cropped, normal quality, jpeg artifacts, (worst quality:1.4, low quality:1.4), bad anatomy, weapon, holding weapon

Also changed the settings a bit to be more close to what is suggested by the owner of the cosplaymix checkpoint.

Even if 000011 is not realistic and others have some problems, that's because of the model weight and I only used the tag "realistic", I could use (realistic:1.3, photorealistic:1.3) and it would force the realism. However with this I could see that even the 15th epoch was capable of being realistic. Actually it was the best of the bunch on this seed. Also if you notice the color of her clothes are better baked in 13+. But I'll do another test now to check another kind of flexibility.

Changing to a hentai checkpoint. I need to test if the model is capable of nudity without inserting weird clothes. I suspect that the shield on her back will be a problem here, but let's see.

I'm using the prompt:
(masterpiece), (best quality), lily enstomach, 1girl, solo, long hair, breasts, large breasts, crying, tears, cowboy shot, nude, completely nude, nsfw, pussy, midriff, navel, <lora:lily_enstomach-000010:1>
blurry, jpeg artifacts, cropped, normal quality, jpeg artifacts, (worst quality:1.4, low quality:1.4), bad anatomy, weapon, holding weapon

On meinahentai, to test it.

You can see that we still got some clothes on and this can happen quite often. A countermeasure is to describe the nudity a bit better. Also reducing the weight might help. So let's reduce the weight to 0.9 and improve the nudity tags.

New prompt: (masterpiece), (best quality), lily enstomach, 1girl, solo, long hair, breasts, large breasts, happy, :D, cowboy shot, nude, completely nude, nsfw, pussy, midriff, navel, nipples, clothes removed, outdoors <lora:lily_enstomach-000010:0.9>

This is definetely better. It has some weird things showing up, but we can get her more naked reducing the weight and improving the tags, Adding negatives like shield, horns etc. It seems that the naked is better on lower weight and epochs. So we should decide if the tag for her clothes and ponytail should be more descriptive or if we should stick with the highest epochs.

After doing 2 tests, describing the colors and clothes, and one without describing the colors these are the results:

It seems that epoch 000012 is an okay one for that, but to get things with her outfit perfectly would maybe required more training steps or adding the tags with more weight. So for me personally the Last epoch is the winner. (Epoch 15). After I decided the winner I should generate more images with that to make it look better and post it on civitai or another website. You can make your own loras for yourself too. Keep in mind that more repetitions and images will get clothes better, but will reduce the flexibility. You can see that sometimes the model have clothing when naked. Use your judgement for what you need the model.

If you are a hentai artist like me, you probably will prefer to get the face better than the rest. So focus on getting good screenshots of the face. Complicated outfits are very hard to get right because somestimes there isn't enough material and you end up with a low flexible model if you push the repetitions too high.

I hope that this tutorial was useful to you.
At least you can understand what I have to go through to train your models.

It's been a long 8 hours without stopping to make this tutorial for you. So I expect at least a bit of consideration when leaving likes and comments.

Thank you for your support.

Comments

Parkun

Wow lora so amazing 😍

BarnabyJones

this whole series is amazing!! i’m assuming if we were doing this and also wanted to make sure the lora worked well for an additional illustration style in addition to what you show we’d just do an extra step like you did with the semi realistic checkpoint right?

artkoikoi

Yes. If you don't use regularization images it can be flexible too, by the way. Just test every epoch. If it's too strong go for the lower numbers. I trained this exact way the models you see on civitai that has some realistic examples.

Yaksha

There is a way to make a style lora, I want to make anime-type images but it doesn't come out or in a very irregular way, as well as for the lower parts of the body that always come out ugly?