Step by step Lora Training
Training a model is very demanding, and the result is a minimum 2GB file ; while a Lora (Low-Rank Adaptation) will be less than 150MB.
Where to start?
I would recommend this google colab link
Linaqruf/kohya-trainer/blob/main/kohya-LoRA-dreambooth.ipynb
Step 1:
Requirements: The preparation of a set of images, and texts (dataset)
Another requirements is a google account (to use the colab link and google drive)
Each image and text's name must match - the size of the images should be 512x512 pixels
It is convenient to use https://www.birme.net/ to resize the dataset.
For the text, best is to give a little description on each file, or to use the img2txt feature and get the terms directly from the AI.
Only 5 images (and texts) are going to suffice, but 15 or more will make the model more reliable.
Once the dataset is complete, put these files into a folder with the number of repeats (5 or 10) and the concept (something like exp, or person, or Bcloth, etc ...)
Once ready add the datasets into the google drive
Step 2:
Open the colab trainer
Go to github.com/linaqruf/kohya-trainer
and pick Kohya Lora Dreambooth
To be continued ...
No comments:
Post a Comment