Can someone explain "repeats", "epochs" and total steps in Lora training? #182
Replies: 3 comments 12 replies
-
Answering some of my own questions from this resource: Total number of steps = (# of images) x (# of repeats) x (number of epochs) still not clear what the purpose of repeats is though. |
Beta Was this translation helpful? Give feedback.
-
The steps calculation is a bit complex with bucketing. The number of steps for an epoch for a certain bucket = ceil ((# of images in the bucket) x (# of repeats) / (batch size)) There are two purpose for repeats.
|
Beta Was this translation helpful? Give feedback.
-
@kohya-ss can you change your repeating logic? with your logic I am not able to use 40 different classification images per training image with having 1 step = 1 epoch it is being 40 steps = 1 epoch however with automatic1111 web ui dreambooth extension, i am able to set any number of classification images per instance and i am able to get checkpoint with even 1 step = 1 epoch with your way this is happening lets say I want to use 100 different class images for per training image. then the minimum checkpoint i can save is actually 100 epochs instead of 1 epoch |
Beta Was this translation helpful? Give feedback.
-
What is the repeats variable? Why would I want to repeat the same 1mage more than once? This seems to inflate the number of steps required.
What is the formula for epochs based on repeats and total steps? I am accustomed to dreambooth training where I use 120* number of training images to get total steps. So if I have 10 images, I would train for 1200 steps. How would I get the equivalent using 10 images, repeats, steps and epochs for Lora?
If I want to get a checkpoint every 100 images, how would I set the "save n epochs ratio" based on the example above?
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions