Sign In

Training LoRAs Locally with Kohya_ss

3

Training LoRAs Locally with Kohya_ss

Introduction

Seeing as how CivitAI has retired Kohya from their on-site generator, I figured that I could make a short guide on how you can use it locally on your computer. You can find instruction on how to download kohya_ss trainer from GitHub here. Due to redundancy, I won't be going over the installation process for Kohya_ss, and will be focusing on the setup & settings that I use for my LoRAs. That being said, don't let my experience stop you from trying anything! Experiment and play around with the types of photos you use and the settings you land on. These are what I feel work best for my workflow; and I'm still learning more as time goes on.

I would also like to note that I'm not a professional. I might explain things incorrectly. I am a dumb coyote, in all honesty. There are a lot of people on this website who are smarter and more knowledgeable regarding this, I simply want to give new LoRA creators a starting point, as I personally found it really hard to dial in my settings for Kohya_ss due to most of the documentation being a bit too high-level for me. If any experience creator does read this, please feel free to chime in with your insight!

Dataset Preparation

Getting good photos is very important to have a LoRA that comes out properly. If you are doing an artstyle, I found that solo pinups give the best results for consistency. I tend to shy away from comic panels since the panels sometimes will be baked into the LoRA.

Once you have your photos, place them in a folder and call it XX_[StyleName], with the XX being a number. This number is how many times your images will be "repeated" during training. For example, if you have 50 photos, and your folder is titled 40_ArtistName, then when you start training, your max_train_steps will be (50*40 / Train Batch Size [typically 1 or 2] ) = 2000 (or 1000). I'll touch on "Train Batch Size" later, but I tend to aim for max_train_steps of about 1500.

Captioning Your Dataset

This next part is pretty simple. Once you launch Kohya_ss, navigate to the Utilities tab, select WD14 Captioning, and locate your image folder. Under Repo ID, make sure SmilingWolf/wd-v1-4-convnextv2-tagger-v2 is selected. Below, you can add tag replacements, undesired tags, and tags you'll want at the beginning of each caption file. If you want a trigger word, add it first. It's best practice to replace some letters with numbers in order to make sure that it's a unique tag (ex: ArtistName -> 4rtistN4m3).

When your settings are looking good, scroll down and click on Caption images. This should only take a minute or two. You can view the output in the command prompt. I highly recommend manually checking these over to make sure that there aren't any erroneous tags, which you can do in the Manual Captioning tab right next to WD14 Captioning.

Screenshot 2026-06-16 131451.png

LoRA Settings

Accelerate Launch & Model Tab

Now for the fun stuff... Navigate back to the LoRA tab, where you'll be greeted with a bunch of stuff. Open the Accelerate Launch > Resource Selection panel. I have my Mixed Precision set to FP16, but I've been experimenting with BF16 on the side. I don't have much knowledge on the difference, but I do know that whatever you choose, you'll want to make sure it matches your Save Precision below. If you have a good CPU, you should also bump up "Number of CPU threads per core".

Under the Model panel, select the Checkpoint you'll be using to train your LoRA on under "Pretrained model name or path" by locating the folder your checkpoints are in. I highly recommend using World Furry Fusion - v1.0 (Refined); I've had the best results come from it. Next, locate your training folder which contains your image folder. This has always been odd to me, but your folder setup should look like: ../Trainings/XX_ArtistName. You will want to select ../Trainings under "Image folder (containing training images subfolders)". I don't know why it works like this, but it does, so idk lol. Lastly, be sure to name your model accordingly.

image.png

Basic Parameters

Scroll down and open up the Parameters tab. Your LoRA type should be set to Standard before anything else. Here is what settings I have changed:

Train Batch Size: 2 (Can also be 1 if your hardware isn't that great. I find 2 is good for me with a 4070ti, but I need to experiment more. More generally means better, but requires more VRAM. This number is what divides your total steps depending on your repeats and number of photos).
Epochs: 1 (I personally am way too lazy to sort through epoch versions, so I just full send it and set it to 1... it's been working for me lol).
Max Train Epochs & Steps: Yes
Cache Latents & Cache Latents to Disk: Yes
LR Scheduler: Cosine
Optimizer: Prodigy
Learning Rate: 0.0005
LR # Cycles: 3
Max Resolution: 1024,1024 (You can lower this to 768,768 if it's slow, but I don't recommend going lower than that).
Enable Buckets: Yes
Text Encoder Learning Rate: 1
Unet Learning Rate: 1
Network Rank (Dimension): 16
Network Alpha: 8

Screenshot 2026-06-16 144223.png

Advanced Parameters

Next, click on Advanced to open all the scary settings. Here are my advanced settings:

Loss Type: L2
Huber Schedule: SNR
Huber C: 0.1
Huber Scale: 1
Keep n Tokens: 1
Clip Skip: 2
Max Token Length: 225
Gradient Checkpointing: Yes
Shuffle Caption: No
Color Augmentation: No
Flip Augmentation: Yes
Don't Upscale Bucket Resolution: Yes
Min. SNR Gamma: 1.5 (Recommended is 5, but I like it a bit lower, personally)
Noise Offset Type: Original
Noise Offset: 0.1
IP Noise Gamma: 0.05

Screenshot 2026-06-16 150032.png

Last Words

That's basically everything! You can click on Start training and wait patiently for the results. If you're looking to tweak settings, I recommend you start with these ones first: Train Batch Size, Min. SNR Gamma, Noise Offset settings (type, general offset, IP noise gamma). I hope I was able to help at least one or two people get situated with kohya_ss on their desktop. If I did and you end up making a LoRA, drop it in the comments!

3