Training LoRA
CoCo can train LoRAs for the SDXL family (Illustrious, Pony, NoobAI and so on) and Anima. Finished LoRAs appear in the asset library automatically, and samples drawn during training are placed in comparison sets so you can pick the best epoch.
Basic steps
Section titled “Basic steps”- In the “Training” space, choose the “Train” step and set “What to train” to “LoRA”.
- Choose a “Dataset” and “Base model” (the list is split into SDXL and Anima).
- Choose a “Preset”.
- Enter a name under “LoRA name and folder”.
- Check the estimate below (images, total steps, approximate time) and press “Start training”.
Presets
Section titled “Presets”SDXL
| Preset | Description |
|---|---|
| 200MB | Rank 16, 10 epochs. Start here for an ordinary character or style |
| 400MB | Rank 32; keeps more detail (complex outfits, styles); the file is twice as large |
| Single image | Rank 8, 8 epochs. For when one or two images are cut into several crops. May overfit. |
Anima
| Preset | Description |
|---|---|
| Prodigy | Adjusts the learning rate by itself, so there’s no number to choose. Start with this one |
| AdamW | A fixed learning rate of 1e-4, with more predictable results. Switch to it if Prodigy overtrains |
Both Anima presets use rank 32 and 10 epochs and save every epoch. Anima uses the VAE and text encoder chosen for generating.
Detailed settings
Section titled “Detailed settings”| Item | Description |
|---|---|
| Repeats per image | Shared with the dataset settings |
| Epochs, Rank, Alpha | Number of training rounds and the size of the LoRA |
| Skip saving first N epochs | Early epochs usually aren’t good yet, so you can skip saving them |
| Train the text encoders too | Also trains the text encoders |
| Random horizontal flip | Adds variety. Turn it off if the character has asymmetric features |
| Shuffle tags | Use with “Keep the first N in place (trigger)” |
Sampling while training
Section titled “Sampling while training”With “Sample while training” on (the default):
- One image without the LoRA is drawn before training starts, then one each time an epoch is saved.
- “Sample prompts” has one prompt per box, up to 4; if the first box is empty, the tags of the dataset’s first image are used.
- Quality tags, negative prompt and sampler are the same as normal generation, with a fixed seed.
- Samples are saved in the output folder’s training samples folder and added to the library, with one comparison set per prompt. “Pick in Compare” lets you use the tournament to choose the best epoch.
During training
Section titled “During training”The right side shows progress, loss, learning rate, speed, remaining time and the files saved so far.
- A LoRA is saved each epoch; the last one’s file name is the LoRA name itself.
- “Stop and save” finishes the current step, saves and stops.
- A note file is saved next to the finished LoRA with the dataset’s trigger word, shown in the asset library.
Measured on an RTX 5080 with 19 images: SDXL with the 200MB preset, 760 steps, about 16 minutes; Anima about 1.7 seconds per step. Sampling doesn’t slow training down.
Pausing and continuing
Section titled “Pausing and continuing”- “Stop and save” saves the training progress as well as the LoRA (in
_coco_progressinside the LoRA folder). - “Paused trainings” lists these: “Continue” resumes from where it stopped (using the original settings), “Discard” deletes the progress.
- To train a few more epochs after finishing, check “Keep progress after finishing” before starting. Afterwards, enter a number in “More epochs” and press “Train more”; the previous last file is renamed first (for example
-e10), so it isn’t overwritten. - You can’t continue if images were added to or removed from the dataset; if only tags changed, training continues with the new tags.
Saved settings
Section titled “Saved settings”- “Save settings” stores the whole left panel under a name; choose it later from “Load saved settings…”.
- Pressing “Start training” also remembers that run’s settings automatically for next time.
- In a dataset’s training history, “Use these settings” trains again with that run’s settings (see Datasets).