Sign In

SDXL LoRAs Training Guide - CivitAI Trainer

5
SDXL LoRAs Training Guide - CivitAI Trainer

CivitAI LoRA Training Guide

Given the low cost to train (for me about 1000 buzz = $1) I moved over to the CivitAI LoRA trainer as I can leave a few jobs going without the need for my PC to be constantly powered on.

Please see my original SDXL lora training guide for local pc training to read up on the dataset preparation.

1. Dataset - Images:

The below is an addendum to the dataset prep in my original lora training guide.

So CivitAI has a maximum bucket resolution of 2048 x 2048. Any pictures you add beyond this resolution kick up an error and you cannot progress .

Therefore, for any dataset pictures I have which are SUPER high res, there is https://imageresizer.com/ where you can reduce your picture size (use the percentage resize option and reduce until your image is under the 2048 pixel limit.

2. Dataset - Captioning

Please see my original SDXL lora training guide for dataset captioning.

3. Dataset - Compressing

Compress your dataset and caption files into a single zip file.

4. Navigating the CivitAI lora trainer

  • Select "Create" -> "Train a Lora" -> "Character" -> Enter a name for your lora

  • Agree to the terms and conditions

  • Drag and drop your zip files into the input box and confirm the acknowledgement box lists your caption as "TAG". (Caption is for Flux so ignore it)

  • Select "OK".

  • Give your dataset a last minute review and add any extra tags if you see fit.

  • Under the "Data Ownership and Sharing" section, select the options according to your situation.

  • Under "Acknowledgement" section, select the checkbox to confirm you acknowledge the terms and conditions.

  • Select "Next" and your dataset and captions are uploaded.

  • Select the appropriate base model for training. (I personally use Lustify SDXL NSFW (Endpoint version)

NOTE: If you use a custom checkpoint you can expect to pay a minimum of 1000 buzz whereas the base SDXL model costs you only 500 buzz.

  • Open the "Sample Image Prompts" drop down and enter 3 distinct image prompts. The trainer will generate 3 test images per each epoch.

5. Training Parameters

I will list below the changes you need to make to the "Training Parameters" section. Ignore everything else. It will either be default or no longer application based on the options you select.

  • Epochs = 5 or 6 (As per my own experience, I always create 6 epochs even if I do end up using Epoch 5).

  • Num Repeats = 20

  • Train Batch Size = 4 (Now the default is 6 but I stick with what I know which is 4)

  • Resolution = 1024

  • Shuffle Tags = Enabled (Ticked)

  • LR Scheduler = Constant

  • Network Dim = 64

  • Network Alpha = 32

  • Optimizer = Adafactor

  • Select "Submit" (buzz cost will be deducted from your account)

6. Review and download

Simply click on your profile in top right corner and select the "Training" option to get to the training page. You can see the progress of your training from there.

Select your training instance and you can then review the generated sample images. Here you also have the option to download the epoch. From personal experience, if I've done 6 epochs, I don't bother with download anything other than epoch 4, 5 and 6 for comparison.

7. Summary

I won't go into the details of using your new lora file using the CivitAI image generation simply because I've never used it.

But at this point, you're now ready to create some images with your lora file(s) and check the output.

Hope this helps. Feedback appreciated and happy to answer any questions where I can.

5

Comments