fallenl's picture
Update README.md
afbb705 verified
metadata
license: mit

This is NOT A GUIDE for LoRA training, and please NEVER treat it as.

This serves as a onging project that I share some of the personal opinions or interesting findings where I learned or discovered during my journey in LoRA training.

To start with, LoRA training could be easy and quick with simple dataset preparation and training setup; but surely that's not what I'm satisfied with.
Based on my personal experience, preparing a LoRA's dataset properly is more important than using complicated and fancy training techniques. Just like cooking, you can't make any tasty dishes using materials without good quality.

  • Dataset preparation

I'll disscuss several steps that I usually do when I prepare the dataset for a LoRA in order, and I'll skip the "How to Get Image Data" part since there're too many tools/methods available for you to use.

  1. After getting all image data needed for a LoRA, remove all none-static image files (.mp4, .wav, .gif, etc). Then change all none-.png format images into .png.
  2. Spend some time going through the images to see if there're any duplicated images and remove them. This will happen a lot if the dataset is large.
  3. Upscale all low-resolution images to at least 2k resolution. But why? Let's see an example:
    We have two identical png images, one with 907x823 pixels, the other with 3624x3288 pixels using simple 4x-upscale from SD WebUI. Now we will crop them into roughly 1k resolution using SD WebUI's _Auto-size Crop_: