derrian-distro / LoRA_Easy_Training_Scripts

A UI made in Pyside6 to make training LoRA/LoCon and other LoRA type models in sd-scripts easy
GNU General Public License v3.0
998 stars 101 forks source link

Question about this repo/program #185

Closed 311-code closed 1 month ago

311-code commented 4 months ago

I am used to dreambooth sdxl training on kohya ss gui on a 4090 and get very good results, especially when doing low merges at 0.05 with other saved checkpoints during the process (some overtrained mixed into most balanced one, etc), then I'll usually do a "lora extract in kohya gui utilities" and it works, but takes forever to do it this way.

My problem is, when I just train a lora from scratch in kohya gui the presets are very bad and I can never get what I'm looking for with 60 images, I've tried various learning rates and parameters. I've tried online guides.

I was about to try this repo out and wondering if it maybe includes any presets for if you are training a style or character, or maybe there is a calculator somewhere and you can enter your number of images, then it spits out the learning rate you should use, steps, repeats, scheduler stuff, batch size based on your GPU, etc.

I find training good loras to be extremely difficult for me and my loras always overtakes the base model person's likeness.

I am also wondering if it's better to sometimes use an overtrained lora on certain base models at a low 0.3-0.4 strength than a balanced lora at 0.7-0.8 strength if trying to put a lora over a dreambooth trained checkpoint (I always lose the face when using 0.7-0.8) and how do I do multiple concepts with captions in a lora, without it mixing them together even when in separate folders like kohya gui specifies I should do. Like let's say a lora of me in one folder and a leisure suit in another. (All in one lora)

This feels like I'm learning how to cook and theres so many ways to do it, I have all the tools, but I don't have a detailed recipe from someone that's mastered it. Anyways that is all my questions, Thanks!

derrian-distro commented 4 months ago

When it comes to SDXL, I don't really have any defaults that I can provide you, as I have not yet figured out arguments that I would consider good enough for consistent use.

In terms of that calculator that you were hoping for, it doesn't exist, and it cannot exist, due to the nature of how training is, if something that simple solved training, more people would be doing it.

When I train a model, I aim for the ability to use it at weight 1 with no issues, even to the point where it is capable of being mixed with other lora.

To do multiple concepts just separate the folders and provide them each as a subset in the subset portion of the UI, there you can set a number of things specifically for each folder, like random crop, shuffle captions, repeats, and so on.

And yes, it is sort of like cooking, but there isn't any clear cut recipes, only vague guides that might actually only hurt what you are trying to make, again this is due to the nature of training models.

Jelosus2 commented 1 month ago

Closing this as there's no magic recipe for training a LoRA and we don't have presets available as of now.