Sign In

LoRA Training in Anima

0

LoRA Training in Anima

Beginning notes:

I am not a scientist. I simply played around with training Anima models and found a workflow that gives me great results. It is very possible and likely that my workflow isn't perfect yet and can be optimized, however I had some trouble setting up proper training for Anima LoRAs so I am making this guide for people that are also trying to get into it.

Dataset Preparation

Images

I train on a resolution of 1024x1024, so I make sure most of the images I have match that resolution. Usually anything under 768x768 gets thrown out immediately. For styles, I like using around 80-100 images, for characters I have so far never used more than 50 and the results are still good. I manually edit and crop each image individually to remove text or unwanted subjects that might mess up and confuse the LoRA during training.

For characters I like to include multiple artstyles, this helps strengthen the LoRAs understanding of what the actually important parts are. If for example the character is a 3D character by default, I will use mostly the 3D images and then throw in 5-10 different images with different artstyles.

For styles I include everything I can find from characters, full body, close-up, upper body to back views, side views, total shots of landscapes, night, day and really every bit of variation I can find.

Tagging

(Find my full workflow for this in the attachments)

For my Anima datasets, I used the same tagging approach that I would use for an Illustrious, Pony or SDXL model. Carefully tagging everything except for the subject I want to train, using the danbooru tags. This can be easily done in ComfyUI using the WD14 tagger and the wd-eva02-large-tagger-v3 model. This so far has never let me down and does a great job.

To make your life a bit easier, I do recommend setting exlusion tags. A fun little trick you can do here is just tagging an example image (or multiple) of your subject and then cleaning them up and using those generated tags as the exclusion tags.

Training

Where to train / What to train with

Civitai currently does not offer training anima LoRAs on their website. There are a few different trainers I tried but the only one that did what I wanted is Anima-Standalone-Trainer by gazingstars123 on github.

Its a quick install and has nice features such as a job list to manage your current and past training configs. You can also easily set your model directories, instead of having to download them again, which keeps your disk clean.

Base settings

I have had great results with as little as 600 steps, Anima is great at picking up styles and characters. For a usual training I go with:

  • 15 epochs

  • Learning Rate: 0,0002

  • 1024 resolution

  • 1024 max bucket size

  • 1 batch and 1 repeat

  • Network DIM and Alpha both 64 for styles, in case of characters I sometimes lower to 32 both

These settings apply for a dataset of 80 images. When I have less images, I increase the Learning rate up to 0,0005 at max. Even with that, results have been more than decent.

0