Dataset & schedule
Plan by target (optional)
Enter a step budget to see how many epochs reach it.
Total steps
- Rough guide
- —
- Steps per epoch
- —
- Effective batch
- —
- Total image views
- —
- Epochs to hit target
- —
The total is images × repeats × epochs ÷ (batch × grad. accumulation), matching how kohya_ss counts max steps. The guide band (1000–4000) is a rough heuristic — the real sweet spot depends on your dataset, learning rate, and subject.
A calculator that instantly works out the total training steps for a LoRA: total steps = images × repeats × epochs ÷ batch size. Before you kick off a run in kohya_ss (sd-scripts) or OneTrainer, type in your dataset image count, the repeats (the number in your dataset folder name), the number of epochs, and the train batch size, and it shows the max train steps and the steps per epoch right away. If you use gradient accumulation, the effective batch becomes batch × accumulation steps, which changes the total — this tool folds that in for you. It also shows the total image views (images × repeats × epochs) so you can see how many times each image is shown to the model during training. On top of that, enter a target total step count and it works backwards to tell you how many epochs reach it, so you can sanity-check whether you have too many or too few epochs. The total also gets a rough guide band (likely undertrained / typical range / watch for overtraining), but that is just a heuristic — the real sweet spot depends on your dataset size, learning rate, and subject (character, style, or concept), so treat it as a starting point only. It's pure calculation with no external API or data, so the numbers you type are never sent anywhere — everything runs locally in your browser.
How to use
- Enter your dataset's image count and the repeats per image (the number in your kohya dataset folder name).
- Enter the number of epochs and the train batch size (plus gradient accumulation steps if you use it).
- Read off the total steps and steps per epoch. Enter a target step count to see how many epochs reach it.
FAQ
How are the total steps calculated?
The same way kohya_ss counts them: total steps = ceil(images × repeats ÷ (batch size × gradient accumulation)) × epochs. One epoch runs images × repeats samples in effective-batch chunks, so the tool computes steps per epoch first and then multiplies by the number of epochs.
Are the numbers I enter sent to a server?
No. The math runs entirely in your browser, with no external API or data. The image count, repeats, epochs, and batch size you enter are never uploaded, stored, or sent anywhere — they are processed only on your device.
What are 'repeats' and where do they come from?
In kohya_ss you name dataset folders like '10_character', where the leading number (10 here) is the repeats per image. It controls how many times each image is shown within one epoch, so images × repeats is the effective image count per epoch.
How does gradient accumulation change the total steps?
Raising gradient accumulation steps makes the effective batch batch size × accumulation. For example batch 2 with accumulation 2 gives an effective batch of 4, which halves the steps per epoch (images × repeats ÷ effective batch) and lowers the total. The tool accounts for this automatically.
How many steps should I train a LoRA for?
It varies a lot with subject and learning rate, but for character or style LoRAs a total of roughly 1000–4000 steps is a common ballpark. The tool flags totals below that range as likely undertrained and above it as possible overtraining, but those are rough heuristics — saving each epoch and comparing outputs is the reliable way to pick the best step count.
Can it work backwards from a target step count?
Yes. Enter a target total step count under 'Plan by target' and the tool divides it by the steps per epoch (from your current images, repeats, and batch) to show how many epochs reach that target — handy for checking if you have too many or too few epochs.