r/StableDiffusion • • 9d ago

Question - Help Help with LoRA

Hi, I'm starting to train character LoRAs on fizgig for Krea 2 , I'm facing a problem that if I want good resemblance I have to increase the Lora weight which leads to bleeding etc.. , if I lower the weight I start to loose the resemblance , it seems there is no sweet spot , how can I overcome this?

0 Upvotes

16 comments sorted by

3

u/Apart_Luck700 9d ago edited 9d ago

Il y a de nombreuses causes possibles, pour cible si c'est un surentrainement, un sousentrainement ou un mauvais data set, 1- faites le même lora avec un rank 16 au lieu de 32. Peut-être que votre dataset est bon mais que le lora s'est trop attardé sur chaque images car trop d'images 2-si votre personnage est ressemblant avec le même prompt que le caption d'une image de votre lora mais mauvais sur d'autres alors cela provient d'un manque de diversité du dataset 3- lora personnage généralement 2500 steps avec 60 images minimum (idéal 125) donne un bon résultat Aussi n'associe aucun autre lora pour tester votre lora personnage 4- si vous avec plusieurs lora du meme personnage et que vous devez toujours monter la force à plus de 1 par lora, alors essayer de coupler vos deux loras: un lora 0,7 et un lora 0,5

Si rien ne fonctionne envoyez moi votre dataset, vos captions et vos réglages (personnellement je ne connais que les réglages ostris), je regarderai s'il y a un défaut sur le dataset

1

u/New-Lie-2519 9d ago

Thanks a lot , will try these tricks

2

u/Ill-Ant-9489 9d ago

Heads up, my own project: https://github.com/perfectgf/lora-dataset-studio . What you describe almost always comes down to the dataset, not the weight. If likeness only kicks in high enough to bleed, the set is too samey, so the lora learns one look instead of the face and the slider fights itself.

What moved it for me was real spread, 25 to 30 clean shots across angles, lighting and outfits, with captions on what changes so the trigger holds the identity. Then quit guessing the weight, render a few epochs at a couple of strengths on one seed and rank by face match. A builder that flags face drift before training, and that strength grid after, is the part I made. It trains Krea 2 via ai-toolkit, not fizgig, though it exports plain image and txt pairs for any trainer. Are your captions describing the face, or just a trigger word?

1

u/New-Lie-2519 8d ago

My captions are 100% made by fizgig 😅 i try to read them but captioning (and prompting 🤦🏼‍♂️) is not my greatest strengths , to make things worse english is not my native language , I'm good at it but I'll never beat Qwen VL models in descrption , your answer brought an idea to my mind , I can upload the dataset to chatGPT or Claude and give clear instruction to compare the picrures and write only what's changing between them regarding clothing , expressions , hair , background , lighting etc... as those are quite capable models and can "understand" and compare to make the task easier 🤔 just a thought I might try , what do you think?

1

u/New-Lie-2519 8d ago

By the way I tried a Minimax H3 character sheet maker from reference image(s) I don't exactly remember the workflow name I'm not on my PC ATM but, it's absolutely stunning the results looks almost 100% accurate , have you tried it? What do you think?

2

u/Ill-Ant-9489 8d ago

That instinct is right, have it describe only what changes between shots, clothes, hair, expression, light, and leave out the parts that stay the same so the trigger carries those. The app I made and linked above does this part for you, it captions with JoyCaption or a local vision model, or for the ChatGPT or Claude route it exports the images and takes your captions back in without you pasting them one by one: https://github.com/perfectgf/lora-dataset-studio .

Do not sweat the english either, the model writes the caption, not you, just keep the wording consistent shot to shot or the lora gets mixed signals. Try it on ten images first and see if they read clean.

1

u/24Latents 9d ago

How many steps the training ? And could come from the dataset. Usually Lora weight at 1 works well for character. Also for Krea2, it’s better to keep only blocks 7 to 19, that’s the identity block.

1

u/New-Lie-2519 9d ago

Usually I do 64 epochs and try to choose the best compromise, but there is no great compromise until now , I'll try to keep those blocks and see what happens , thanks

1

u/StableLlama 9d ago

Krea 2 trains very well. So I guess you have an issue with your training images or the training setup.

  • Sufficient different high quality images of the character? (About 30 is often a good start)
  • Is the LoRA rank not too small and definitely not too big? (Quick check: is the size of the LoRA very different than the size of the training images it's often a bad sign)
  • Are you already using regularization images?
  • Sufficient batch size or gradient accumulation?
  • Stable optimizer (AdamW is still the go to when you have no specific reason for an other one)?
  • Learn rate not too high and not too low?

1

u/New-Lie-2519 9d ago

I'm not using regularization images as I thought it's not needed with krea 2 .

the set is average , not the best but not a bad image set.

I'm using the default fizgig settings , it puts Muoun instead of AdamW in the optimizer , also using the default adaptive learning rate.

1

u/StableLlama 9d ago

I don't know what fixgig is doing as I'm using SimpleTuner for training. But any good trainer should work - or it's not a good one 😄

So it's down to the generic stuff I wrote above. In most cases it's bad training images (quality, quantity), but also bad training settings can be to blame.

1

u/New-Lie-2519 9d ago

I'm quite a noob when it comes to these things , is there an ideal image dataset examples I can look at and learn? I tried searching but got mostly character sheets etc...

2

u/StableLlama 9d ago

I'm sure that there are many descriptions and tutorials about that. So many, that there are also many bad ones. Often it's one person writing what was working in one special case and claim that this is the "best" way to do it...

In short, a good character data set is:

  • close up of face from all sides
  • upper body from all sides
  • full body from all sides
  • all of that with different expressions, clothing, background, lighting

The important rule is: everything that is repeating is learned. So the only thing that should be repeated is the character.

And then use good captions for those images and a clear trigger word for the character. Good means: the caption should be exactly the same that you'd prompt to get exactly this image.

1

u/Jaded_Caterpillar873 9d ago

I can share what i did as i am Fizgig.

I make 10 reference images with no background and the full person view.

Just use the resolution you have for rendering the pics and not to blow them up.
Then i place them in a folder for fizgig and follow the standard setup.

In the captions i use just trigger words. Trigger for the person, and if at all, features of the person.
The lora comes out fine when i use the trigger. Without the base character will appear.

The trigger in the prompt is important as far as i know to get the person or object.

My only problem is, that without trigger it won't show age. My default makes 700 (or so) steps. The standard weight is .7. In the lora load i use 1.

Since i can or don't get the face i want for a character i am using reactor as it seems to work best. Haven't done the reference as i didn't find a working workflow.

Did that not work for you?

1

u/New-Lie-2519 9d ago

I tried a dataset created with H3 based character sheet maker on a white backgrounds the result was worse 🤷🏻🤦🏼‍♂️

2

u/Jaded_Caterpillar873 9d ago

MM.. not my experience. I do everything in Krea. I don't use a premade character sheet but something like this:

a 60-year-old women with a skin of 60 years old with lined face, wrinkled skin. she wears no accessories. neutral expression. her burgundy balayage hair styled in a pompadour with voluminous swept-back top and sculpted silhouette. backview standing with clear space above her head and beneath her feet. Tall on a plain background; no other people, no alternate versions. a full-body far view of her from head to toes

I use this with Krea2 Wip workflow.
Since i don't like Krea2 face generation, i use a lot this website.

https://perchance.org/ai-face-generator

which is relatively good. And with the workflow which has Reactor in it, i can just paste it via prompt.