cute and fluffy
i highly respect the artist so commercial usage is not allowed
Description
FAQ
Comments (5)
Hello Elyan, I wanted to start training my own Lora myself but Im fairly new to this. Could you tell me what the best settings are? Like for example what are the best amount of steps or how many epochs are good? etc. Oh and could you tell me the model you used in your picture? Thanks!
In the event the LoRA creator does not reply, here's a few tips from my experience so far:
Best amount of steps highly varies - based on the quality and content of your dataset, what exactly you are trying to replicate (style, concept, character etc) .. and how similar your training target is to something already in the base checkpoint. For example, a simple character doesnt need that many steps since similar-ish characters are already in base models usually.
I find 1500-2500 total steps is a good target range but you must experiment.
Epochs are basically just re-training cycles. "Steps X epochs", and each epoch gives you a separate file.
So for example, if you have 100 images, and set them to 10 steps each (by naming the img folder 10_image), then you will train for 1000 steps.
If you choose 5 epoch, then you will do (1000 steps) x (5 epochs) = (5000 steps total) - but with a separate LoRA file produced every 1000 steps (every Epoch) - a LoRA at 1000 steps, a LoRA at 2000 steps, at 3000 steps, at 4000 steps, and 5000 steps.
Then you can create an XYZ plot using each epoch (step level) of the LoRA to see which one turns out the best in your opinion.
@datSato Oh nice, great explanation! Going to play around with those values now thanks!
@Jazzbacon
@datSato already answered the question but I'm going to add something to the general formula:
1.- Formula for Steps for an epoch (one bucket):
(number of images x number of repeats / batch size) = steps
2.- Formula for Total Steps:
(number of images x number of repeats / batch size) x epochs = total steps
If you work with regularization images or buckets the formula change a little bit
1.- Formula for Total Steps (you can have multiple buckets but for this example i gonna put 2):
(1#Bucket + 2#Bucket)x epochs = total steps
I will also leave you some things that helped me when I was learning to create loras.
1.- Kohya explaining how the steps work
https://github.com/kohya-ss/sd-scripts/discussions/182
2.- a detailed guide on how to create loras
@LacraMaxima thanks!
