Sign In

How to make a lora, simple!

16

[deleted]

Mar 29, 2024

(Updated: 2 hours ago)

training guide
How to make a lora, simple!

Stable Diffusion How to Make a sd1.5 LoRa-Using Google Collab

Step 1: Gather Dataset/Training Images

• Gather around 30-90 images of your subject. Make sure to have about 60% of the images be good portrait-style photos. Include a few full-body photos as well as profile shots and back shots.

Step 2: Birme.net

• Use Birme to turn the images into 512×512 squares. Save as a Zip file, then unpack the zip.

Step 3: Dataset Maker

• Go to step 1 Setup and enter the project name. Then press the "play" button right next to it. This will then load into your Google Drive.

• From your Google Drive, go to My Drive/Loras/project_name/dataset and drag and drop the unpacked photos from the Birme download into the dataset folder. Your dataset folder should now be filled with 512x512 images.

Step 4: Tagging your images.

Now, back to the Dataset Maker page, scroll down to step 4 and press the "play" button right next to it. It will now tag your images. Once the images are tagged, copy and paste the tags that directly describe the subject and only the subject into the "remove-tags" box. It should be a list such as; (solo, long hair, realistic, male focus, blue eyes, blonde hair, lips, tattoo, bodypaint, brown hair, facepaint, black hair, goggles, etc.) See how it's only descriptive words that help train the ai on character traits? That's what we want.

Then press the step 5 curate your tags "play" button. This one is practically instant. You're now done with Dataset_Maker. I recommend saving your tags in a text document within your stable diffusion. Somewhere you can easily access it.

Step 5: Lora-Trainer

• Go to the Lora-Trainer webpage and enter your project name. Then choose the training model (I go with Stable Diffusion sd-v15-pruned-noema-fp16.safetensors).

• Scroll down to "Steps" and do this equation; (600/#of Photos). For example, for 60 images, the value would be 10. Since 600 divided by 60 is 10. Do this for your personal image count. (It recommends doing 300/image count, but I've noticed 600 is better.

• Scroll to the bottom. Under "Structure":

  • Change "network_dim" to 32.

  • Change "network_alpha" to 16.

  • Press the play button at the top to bake LoRa. When it is done, it will appear in your Google Drive in the output folder within your LoRa folder.

Profit!

Cheers.

16