Dear all,
some of you asked me what makes some of my LoRA great. Principles are quite basic, and I will share the right ingredients (to the best of my knowledge) to make a terrific LoRA.
This short guide is tailored to PonyXL character models, but it has enough breadth to be considered quasi-general outside this range:
Great dataset. Prepare your dataset meticulously; hundreds of images could be counterproductive. Your character's main characteristics and details are patterns that repeat in all your images, so overloading the trainer with these details will make them over-persistent. The right number of images to use is between 50 and 100;
Double-check the labeling of your images. Be extra careful about the labeling as well. You don't need tens and tens of labels. Often, many details are incorporated already in your trainer model; however, what makes your character unique must be specified. Automatic labeling systems are fine both for non-real and real characters. However, double-check your labels because you can find bad surprises and wrong labeling;
An understandable activation tag. Make it simple, not some wifi password-like;
Number of repeats. The number of your images determines this. The number of repeats times the number of images should be, at most, the value of 350-400. So, for 50 images, you should only go for up to seven repeats. A good value is around 4-5 for 75-80 images.
Number of epochs. Between 10 and 12, no more, no less, possibly;
Network dim and network alpha. 32 for the dim, 16 for the alpha;
Batch size. No more than 4, no less than 2;
Total number of steps. It should be around 1100-1300. More is still ok but going beyond 2000 might result in an over-training;
Base model. SD1.5, SDXL, or Pony. Your choice. Simple models are always general to have maximal flexibility;
Testing. Test, test, test! Use also your original images prompts if you like, but try to test is as much as possible. A good LoRA should work with a weight of 0.8.
And now... produce as many juicy LoRAs as you can!
At your service,
Glober
