santa hat
deerdeer nosedeer glow
Sign In

CivitAI's trainer: A simple, beginner's guide to training character LoRA using it

CivitAI's trainer: A simple, beginner's guide to training character LoRA using it

Last update: 12-11-2024.

Note 1: Like this guide? Consider supporting me at https://www.patreon.com/c/MetalChromeX so I can continue making cute anime girl models (and hopefully better pay off the crippling college debt I am about to be enduring after I graduate next year)!

Note 2: For more training tips, check out my new article, "A no-nonsense guide for training character LoRA on Google Colab!"

Intro

So you want to make a character model of a character you like, have some free time (lucky you!), and don't want to pay someone to do it? This will give you a comprehensive overview! There are other guides like this on CivitAI, but I tried to make this one super straightforward and intricate!

Training LoRA directly on CivitAI may seem intimidating, but it's easy! There are some basic things you'll need to know, though. I'll keep this article as simple as possible to provide a fast lane for those interested in making character models but feel it's either too hard (it's not) or thing they need a powerful computer (pretty much any simple PC you can do this with). I will plan to update this guide as I get new information or suggestions from others.

Step 1. Get screenshots/images of your character

(Let's use C.C. from Code Geass as an example, the last character model I did while initially creating this article).

You'll first want to get a bunch of images of the character you want to make a model of. In other words, get a data set. This will likely be the most time-consuming process. The idea is to get as many high-quality images as you can. Try to get the character in as many outfits, angles, poses, etc., as possible. Websites like https://fancaps.net are excellent resources for getting screenshots without manually downloading episodes and using the Snipping Tool on YouTube videos or whatnot.

As a side note, you don't need to use only official art or screenshots; this is just the method I use to make character models look as on-model as possible. You may want, or even need to, use non-official sources in your data set, especially if your character has limited screen time.

Avoid screenshots where the character appears blurry, poorly drawn, blocked off by another character, etc. Ideally, you'll want at least 50 screenshots to provide more info for the model to train with; however, you can get away with less.

To give some examples, I trained my C.C. model with 377 screenshots, while my Shuuko Komi model only used 44. However, Shuuko does have less screen time in her anime than C.C. does. If you are trying to make a comprehensive character model, you'll want to include screenshots of as many different outfits as possible. If you only want to throw characters in simple outfits, like bikinis or their birthday suit (heh), a large number, like 377, may not be needed. Short version: the more screenshots, the better, but you don't need 100s of screenshots to make a good character model.

Step 2: Prep your data set.

This step may also be time-consuming, but it likely won't take as long as step 1. Crop out any extra characters in your screenshots. For C.C., for instance, you'll want to crop out Kallen, Lelouch, or whoever else may be in that screenshot.

The only other thing I'd suggest taking note of is tagging. I'll get to this in a moment, but if a character has a variety of certain outfits, you will want to keep keywords in mind. For C.C.'s most common appearance, you may want to tag the model with keywords 'White bodysuit, straigtjacket, wide sleeves, long sleeves'.

If your character has many different outfits, my biggest recommendation is to make folders for each outfit with a descriptive keyword. Here's how I organized it with my Fujiko character model:

Step 3: Upload your dataset to CivitAi

Here's where things start to come together! At the top-right of CivitAI, click the down arrow next to the create button and click 'Train a LoRA.' You'll want to click the character button of Estelle Bright and then type in your character's name.

From here, you'll be asked to add training data. Drag and drop your pictures in here.

This will add your pictures. Note that it will say 0/(however many images) labels.

CivitAI makes things easy with the Auto Label button. Click that button, and you'll be greeted with a somewhat intimidating screen. Don't worry, though, as this isn't that bad.

If you uploaded images in folders (like I did with Fujiko), I recommend uploading the contents one folder at a time and then clicking the Auto Tag button. You don't have to worry about Caption (that's for Flux). The only thing you'll need to worry about is Append Tags. For instance, if you want to label all of C.C.'s white straightjacket images under a single tag, type in 'default whitejacket' or whatever you want the trigger keyword to be. Then click submit. If CivitAI isn't derping out, it'll upload the tags and apply them to your picture.

I would also advise you to look through the tags and ensure there are no inaccurate tags (i.e., 1boy when you have a female character). You can also manually add tags to each image by typing in the 'Add tags...' box and clicking the little + icon. I recommend typing to label essential elements that may have not been automatically tagged (like a specific item, background, etc.). Rinse and repeat this for all images until all your images are tagged as efficiently as possible. Then click the Next button at the bottom. It'll then create and upload your dataset.

Note: Sometimes CivitAI poops out and doesn't want to create and upload your archive. This, of course, is annoying and seemingly random (I'd say it has happened about one in every five times for me). For characters with many outfits, I like to keep track of their outfits and keywords that CivitAI auto-tagged in a Word document, as I usually put these tagged keywords in my description. Most of the time, if I re-tag everything from scratch, it'll create and upload the archive with no issues. Here's an example of what I'll keep track of when making a character model:

You'll now be asked what base model you want to use. You can use any, but this article was written with SDXL Pony in mind, so I'll select that here. From here, you'll want to go under advanced settings.


The big things to note are Epochs, Num Repeats, and Train Batch size. Depending on your data set, it'll auto-adjust. I did a small 11-image set here to grab a screenshot quickly, but my actual C.C. model had 1 repeat. Ultimately, though, the more steps, the better. My C.C. model, for instance, had 7,360 steps. What I'd recommend is 50 epochs. CivitAI allows up to 10,000 steps. More epochs will take longer and and cost you more buzz, but I've found the end result tends to look better. My models usually have cost me around 2 buzz or so. However, since I have a Patreon, I will buy buzz, if needed, to make character models. I think it's worth spending $2 or $3 versus 50 cents or so to create a higher-quality character model that more closely resembles the source anime or whatever form of media your character comes from.

I'd also recommend checking the Dimm and Alpha settings. It usually defaults to 32 and 16; this is fine, but keep in mind your file size will be around 200MB. Changing it to 16 and 8 should generally be fine, and cut the file size in half; this is what I have started to do lately. If you have a smaller dataset, even 8 and 4 should work and you'll knock the file size down to about 50MB.

Anyway, when you're done, click the Submit button. This will debit your account with the amount of buzz it takes. From here, you will need to wait. Generally, the ETA is inaccurate, and you must wait longer for it to complete training.

Step 4. What to do after the model is created

After your model is done, you'll receive an email letting you know it's ready for review. From here, it'll give you three (usually hilariously low-quality) sample pictures. I almost always delete these and make images in Forge WebUI or ComfyUI using the newly created model. I won't cover how to make good images here, but I'd highly recommend deleting those three images and uploading at least one good image you created. You'll want to download the latest model (i.e., the one with the highest epoch, 69 in the case of this example image) by clicking the download button and loading it into your models folder on your PC.

From here, you can either immediately publish your model or pre-schedule it by clicking the clock button. I've done this a few times to get the model's page up so I can come back and edit it later before publishing it. You can always immediately publish it when you're ready.

Conclusion

Depending on how complex your character model is, making a model can be quick or time-consuming. However, CivitAI makes it as easy as it can be. There are plenty of methods for making character models, but CivitAI, from my experience, is straightforward, and this way, you can use your local GPU for something else.

98

Comments