Hello and welcome to the LoRA making Guide by Khanykov and your Sensei Songque.
Quite a few people asked for it at this point, so here we go.
But before we start let me point out a few things.
1) I use LoRA Dataset Maker and Trainer by HollowStrawberry. So this guide covers how to make LoRAs with multiple Outfits in this specific LoRA Maker. If you are using a different LoRA trainer, I'm not sure how it will help you there, except maybe the Outfit Prompting part.
2) The max number of outfits per LoRA is 6. You can try to go for more, but the chances of it being good will decrease drastically (Overbake/Not flexiable)
3) Don't worry if you are a pro or a rookie or never even made a LoRA, I will be going through every step of the way regardless.
4) I do have to point something out though if you don't like reading, well I had to make sure I write about every little thing there is, so there is a lot of text, but also a lot of images. The guide itself is a very simple STEP BY STEP guide. I doubt you will get confused.
5) Don't forget that Table of Contents on your right is going to be helpful if you are ever get lost or you need some info from here or there!
And now with all of that out of the way... Good Luck and have Fun making your LoRAs!!
LoRA Guide Start
Class is now in Session!
Let's start by understanding the layout of how we will be going through our training and visiting the LoRA Maker itself.
List of everything we will be doing:
Getting to Know how Google Colab Works
Getting images for the Dataset
Creating/Tagging the Dataset
Sorting/Re-tagging the Dataset
Preparing the LoRA Trainer and Cooking the LoRA
Testing the LoRA
Here is the link to HollowStrawberry LoRA Dataset Maker (LoRA Trainer itself is just one click away in the selection tab), get acquainted with both and let's start cooking: https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Dataset_Maker.ipynb
Getting to Know how Google Colab Works
There are a few things you need to understand before using it.
First of all make sure you have a Google Drive, which has enough space for your LoRAs.
You get 15GBs for free with a new account, it's usually enough for a lot of LoRAs (20-30 or so)
Of course you can always delete old datasets/outputs to make space for more LoRAs.
Secondly Google Colab is free, but you will have limited usage time. More on this later, but just know that you can check the time on the Top Right of your screen:Another important part is: You can switch Between CPU and GPU.
GPU will be mostly used only for training the LoRA itself.
CPU is what we will be using to prepare the Dataset. Why CPU ?
Well here is the reason: With CPU you get WAY more time usage, so you can sit and fiddle with your dataset without any rush. Tagging images is quicker with GPU though, so swap back and forth if you want, but make sure you've got at least 1h 30m on your GPU before you start training your LoRA.In case you are wondering, but on how to get more GPU/CPU time ? Well you either pay for more or wait for it to recharge... Or you use my method called "Have several Google Accounts". No VPN or anything is needed, each account will have it's own GPU/CPU time usage and their own google drives, so you have even more space for your LoRAs. I currently have 4 Accounts. My Main + 3 Alt Accounts and I just switch between them or train several LoRAs at the same time.
Getting Images for the Dataset
Now that we know how Google Colab functions, let's move to the fun part.
Getting them Images, but before that let's understand that we are making a LoRA with multiple outfits. So that raises a question how many images per outfit is needed ?
So here is a chart you can follow:
Quick clarification: No you don't need to have 20 20 20... for each outfit, you can have 3 outfits for example with images going like this: 10 for 1st outfit / 20 for 2nd outfit / 40 for 3rd outfit.
1 Outfit: 8 - 100 Images (Can have NSFW/Naked Images if you want more flexibility)
2 Outfits: 8/10/20/30/40/50 Images Per Outfit
3 Outfits: 8/10/16/20/30 Images Per Outfit
4 Outfits: 8/10/16/20/25 Images Per Outfit
5 Outfits: 8/10/16/20/25 Images Per Outfit
6 Outfits: 8/10/16/20 Images Per Outfit
Now back to Getting Images.
Today's Model is going to be:
Honkai Impact 3rd's Character Durandal and her battlesuit Bright Knight Excelsis.
There are 2 paths you can take now.
1) Quick and easy Path, but you will have to sort through the images and half of them will be bad, but if you are lazy or don't have a lot of time, you can go with this one.
2) Search for the images yourself and make sure that they are exactly what you want.
I will be covering the 2nd method, because that's what I use. I'll explain the 1st method when we get to Creating/Tagging the Dataset.
(We will be taking screenshots in some cases, so if you don't have a Screenshot program,
I recommend Lightshot: https://app.prntscr.com/en/download.html)
Getting images is easier than you think. You have 5 sources overall, but not all of them will work for you, it depends on what character you are making.
And Priority overall goes with the 1st Source having the least priority, you can start with it, but if you get enough Artworks from other Sources, you can get rid of 90% of the 1st Source images. 2D > 3D pretty much.
I usually just start with the 1st Source, so I know what outfits I'm going to be looking for, otherwise you can always check Wiki for that character, of course.
1st Source - Only for a Game Character with 3D Model.
If your character is an in-game character with a 3D Model, then time to start up the game and start taking screenshots with the in-game viewer, which games like Honkai Impact 3rd, Genshin Impact, Honkai Star Rail, Punishing Gray Raven, Aether Gazer, etc. usually have. Since we are looking at a Hi3 Character, we are able to take screenshots like this:2 things of note:
1) Max amount you should be going for is 4 Full Body screenshots / 3 Cowboy shot* Screenshots / 3 Upper Body screenshots. Front / Left Side / Right Side / Back.
(1 Full body back view screenshot is enough, you are not going to generate from behind much and Ai will figure that part by itself in most cases)
*(Cowboy shot is a movie term, which identifies as A photo, which includes the subject's face down to their mid-thigh. Middle screenshot of Durandal is such Photo)
2) Make sure that you show either the outfit properly our at least both eyes. For example "From Side" screenshots are not fully from side. More of 45 degree angle, otherwise you might make Ai think that outfit is fully white overall, instead of white / blue center / white, It only saw white from side, so it thought it's only white.
And since we touched on Game Model, of course we have such things as MMD Videos.
I usually either just google a character MMD or just browse Akashi's Youtube Channel, they usually have what I need, so here is the link:
https://www.youtube.com/@Akashi1939/featured
For example here is a video with Durandal's 3rd outfit (The outfit is not very popular, so not many artworks have been made... akhm... 1 artwork...) Thanks to this MMD video, we can get several good screenshots, just remember to use at least 1080p.
2nd Source - Main Way
The good old Danbooru/Gelbooru (Pixiv also works, but I can't use it, it's blocked in my country and with VPN it's very slow, so I won't be showing it here, but you are free to use it)
This is the Main source of where you will be getting your images from.
Just google your character's name and behold it has some or a lot of entries on here.
Now I must Warn you. It's a NSFW website, you are going to see some messed up stuff there. If you wish to avoid that you can use Safebooru, but there are WAY less images there. Even if you think an image is SFW it might not appear on Safebooru.
Time to start scavenging!
We are looking for images with good sharp artstyles and poses, not WIP or sketch-like images. (I mean you can use such images, but I'd only use them if there are barely any artworks of your character...)
Here is an example:
Image 1 has sharp artstyle and full body as well, so that's a grab straight away!
Image 2 on the other hand doesn't have the sharpest style, but it's not a sketch-like image, plus it has good pose with a finger up, so we will be taking it as well.
Image 3 is similar to WIP images and also looks like a sketch-like overall, so try to avoid images like that.
Image 4 is an example of an image with several characters. We can't take full images like that, because the Ai will get confused, so we screenshot the character, which we need and take only that.
3rd Source - Google, low amount of images scenario.
Pretty self explanatory, if your character doesn't have a lot of images on Booru Websites or doesn't have 3D Model in-game/MMDs, just google the character. Trust me you might find more than you'd expect. From bizarre in-game screenshots to some unexplored fanarts or just some Wiki images.
4th Source - Anime Series Character
I don't think I need to explain this as well... If your character is from Anime and there aren't many images on Booru Websites, you can well just take screenshots in the Episodes of the Anime itself. You can also just search for such screenshots on Google, but you do you.
5th Source - Desperate measures
Let's say you've searched, got a few images, but that's it. There are not enough of them aka. less than 8 image for an Outfit or most of them are from the 1st Source, which is just plain old 3D, horrible for style of the LoRA.
Well fear not, because Screenshot Cropping is a thing. Let's take this Durandal Artwork as an Example. Instead of having just this image, you can have 4 more by just cropping it. And yes this may sound very weird, but it works... I'm also going to be using this method and you can see such cropped images in my dataset below.
Now that we got our images, there is one important step. We have to name/number them. Yes. Every single image should be numbered from 1 to 120 or whatever you got in your folder. Example with 3 Outfits: 1st Outfit: 1-20. 2nd Outfit: 21-40. 3rd Outfit: 41-60.
Shortcut Tip: When clicking an image and then pressing F2 it will let you rename the file straight away. If you select all of your images in order and then press F2 and rename the file, all of the files will be renamed to that name, but with (1), (2), etc. after. This is a good shortcut, but because a lot of files have different extensions such as PNG, JPG, etc. you might end up with files having the same names, that is a BIG NO. So if you decide to use that shortcut, be very careful and check each number, the LoRA will fail to train if you have 2 files with the same name, but different extensions.
(Also change images with webp or jifi extensions to png or jpg)
Here is how your Dataset should look like right now.And yes I am adding 2 additional Outfit for this Durandal LoRA. One is just her Story/Manga outfit and the other is from a Stigmata in-game.
I have 20 images for 1st Outfit, 16 images for the 2nd Outfit, 20 images for the 3rd Outfit, 10 images for the 4th Outfit and 16 images for the 5th Outfit.
20/16/20/10/16 Overall.
Creating/Tagging the Dataset
Now that we have our Dataset ready let's go back to Google Colab Trainer and start working in there.
(P.S: If for some reason, Auto-Tagger does not work for you, you can always use CivitAi's free Auto-tagger, just go to LoRA training)
First and foremost we need to create a LoRA folder with the Dataset Maker.
Once again here is the link to it: https://colab.research.google.com/github/hollowstrawberry/kohya-colab/blob/main/Dataset_Maker.ipynb
1) Change Runtime to CPU (Default is GPU so change it by clicking on slider arrow on the Top Right of your screen and then click Change Runtime as I've shown before), you can keep GPU of course to tag your images faster, but you'll waste precious GPU Time. Or keep it on GPU until you finish tagging and then switch to CPU, that works too. I usually forget to switch, so I'd rather just sit on CPU from the start.2) Name your LoRA in the Start Here -> 1 Setup section and press Start. It will ask you to permit Google to use the Colab, then ask Google Drive Permissions, just agree/continue on everything. And don't worry if you receive those messages of "Security Alert! Someone has accessed your Google drive, is it you ?" I get like 20 of them per day each time I connect my drive to the Colab...
3) You can now go to your Google Drive and see that you got a new Folder named LoRAs and in it you'll see your LoRA folder.
4) If you already have your folder of images ready then just dump all of them into the Dataset Folder and wait for them to upload.
While you wait let me explain what the 2nd section in the Dataset Maker does.
If you already have your images and dataset ready you can skip this part below or read it for future LoRA making.
Scrape Images from Gelbooru.
Remember I said that there was a quick and easy way to get images, but the results might be really bad ? Well here it is. Let's proceed with our Durandal Model as an example and say we have no images for a dataset right now, just an empty Dataset folder in our Google Drive.
All you need to do is see what tags are used for your character on Gelbooru and insert them into the Tags line. Then run it and you will get all of the images, which fit your tags. So for example if you write "1girl, solo, bianka_durandal_ataegina_(bright_knight:_excelsis)", you'll get all images, which have those 3 tags on Gelbooru. After you run it, you will get a few prompts to accept such as: "Found this amount of images proceed with download ? Write Yes if Yes."
Now you'll have to sort those images. Click Run button in the 3rd Section called
Curate your Images, wait a bit and you'll see all of your images, now sort them in the same fashion as previously explained in the Getting Images for the Dataset Part and delete those, which are not Worthy.
And after you sort through these images you will be back to where we left off.
5) Now then let's go back to our original Dataset. Everything should've finished uploading by now, so it's time to start tagging them.
Simply click the Start Button in the 4th Section: Tag Your Images
It can take from 5-15 mins depending on how many images you got, so be patient it needs to install all of the packets and such. After tagging is done you will get a column of TOP 50 tags you have in your dataset.
Sorting / Re-tagging your Dataset
1) Alright we got our tags and it's time to clean them up a bit,
so Move to Section 5 Curate your Tags
First of all think of the Global Activation Tag, you'd like your LoRA to have.
Do try to think of a Tag, which doesn't align with any normally used words.
Character name is fine, weird shortened names/words are also fine.
Good Example: Durandal, Dudu, Roalli, Paaluy, etc.
Bad Example: Miss_Elf, Shelve, Rose, StarryLady, etc.
(Ai will see ELF and make an elf person, Ai will see Starry and make a Starry sky and so on. Though it is fine to use such Trigger Words when you literally generate an ELF for example. In Durandal's case 3rd Outfit is an ELF, so for that one we will use Bke_ELF trigger, Global Trigger still won't have an ELF in it though, keep that in mind)
After you've settled on your Global Activation write it in the top line.
In the line under it we will write tags, which we want to remove. I personally always remove any background tags the LoRA has, makes it less likely for Ai to make images with white border lines or similar backgrounds, which are in a lot of your images.
Example: Hi3 Background in the Character Viewer. It's a Starry night sky, which will appear in your images a lot, if you don't remove the Starry sky/Night Sky tags, so that's why I'm going to remove them from my Durandal LoRA.
Press run and wait for a few seconds.
Now if you check your Dataset, you'll see that you have .txt files with the same names as your images and if you open them you'll see their tags and at the start the Global Activation Tag
2) Now that we have everything tagged, time to sort our images. In your Dataset folder make several folders and name them whatever you like, but I suggest making them something that won't confuse you and add numbers at the start 1-6 so they are sorted from the 1st Outfit to the last Outfit. Example my Durandal LoRA Folders look like these:Now select your images and put them in their respective folders
In my Case it's like this:
Default Outfit images + txt files in the 1Def Folder
Punk Outfit images + txt files in the 2Punk Folder
Elf Outfit images + txt files in the 3ELF Folder
Story Outfit images + txt files in the 4Story Folder
Swimsuit Outfit images + txt files in the 5Swimsuit Folder
And done, now every image has it's own place to be in.
3) Go back to Google Colab and head all the way up to the 1st Section.
We will now go through each outfit and do 2 things.
1) Re-tag / Add appropriate Tags and of course Remove wrong ones.
2) Add Activation Tag for each Outfit.
Put Slash in front of your LoRA Name and then write folder name of your 1st Outfit.
Press Run Button and wait a second.
You will be doing the same procedure every time we swap between Outfits, so remember it!
4) Now head down to the Extra Section (It's after Section 5 and 6)
Analyze Tags
Remove number 50 and write 75 or 100, whichever you want, I prefer 75.
And press the Run Button
You will now see the list of the tags for the Outfit Folder you chose,
with the Global Activation Tag at the very top.
5) Now comes the hardest part.
Know Your Outfits Like You Know Your Body!
Because Ai Ain't Helping You!
And I mean that quite literally. You see you can just let AI tag all of your images, give each outfit their unique Trigger Tags and run the LoRA Trainer. But one big issue which you will notice quite quickly is that if you have let's say 2 very similar outfits (Tag wise that is, aka. 2 white dresses), you are not gonna have a good time.
And also if you think Ai tags your images properly you are very wrong. Something that should be quite obvious in Ai's vision can be completely different.
So we have to make sure each Outfit is unique and make sure Ai doesn't screw us over.
We are not going to have 2 White dresses.
We are going to have. Example: 1 "sleeveless dress, halterneck, white dress" and 1 "strapless dress, cleavage, white dress" Now Ai will be able to differentiate between the outfits. But to make sure you understand what clothing is which you need to train yourself. I will probably make a PDF file showing types of clothes/clothing terms, but probably at a later date. For now you can use the Booru Tag Wiki system to see what clothes correspond to which tags: https://danbooru.donmai.us/wiki_pages/tag_groups
Durandal's default outfit by Ai is this:
Character: "long hair, blonde hair, blue eyes, hair between eyes, hair ornament, jewelry, earrings"
Outfit: "armored dress, dress, gauntlets, black gloves, thighhighs, elbow gloves, bare shoulders"
Technically I didn't list all of the tags it thinks the outfit is, but other tags it showed have barely any scenarios of appearing. For example: "sleeveless dress" appeared 2 times / "breastplate" appeared 1 time / "blue dress" aka. the only identification of outfit color appeared only 1 time...
That's why we need to know what we are looking at and fix it ourselves.
In most cases Ai will get the appearance correctly, so no need to meddle too much in there, but still check. In this case Ai forgot Durandal's drill hair. Open a full body image of the outfit you want to tag and write down what tags you think it should have.
Correct Durandal's default outfit by me:
Character: "long hair, blonde hair, blue eyes, drill hair, hair between eyes, hair ornament, jewelry,"
Outfit: "armored dress, halter dress, halterneck, sleeveless, blue dress, white dress, blue skirt, pleated skirt, two-tone skirt, black skirt, breastplate, detached sleeves, white gauntlets, black gloves, black sleeves, black thighhighs, thigh boots, armored boots, clothing cutout,"
(Also no need to tag footwear if it's like regular high heels, ankle boots or normal sandals, I usually tag footwear only if it's like knee boots or thigh boots, because you can see them in most images. Let Ai deal with lower footwear)Important Explanation: Let's say you have a tag "skirt" and a tag "pleated skirt" in the tag list Ai gave you. (You have 20 Images) Skirt has 20, Pleated Skirt has 10. So in the next section when you add tags to your images, you can just put "pleated skirt" in the line, so it goes to 20. But you can still put "skirt" in there, it will still end up being at 20. So all important outfit tags need to be in Every single image is what I'm trying to say here. "Part of the outfit ? Shove it in every Image"
Now that we have all of the correct Outfit Tags, it's time to add them to our folder. Go back to Section 5 Curate your Tags.
1) Write our Global Activation Trigger in the top Line, so it affect all of the images.
2) Think of a Trigger word you want for your Outfit and add it to the line under it.
3) Input all of the Correct tags after your Trigger Word.
4) Press the new_becomes_activation_tag Button to have a Checkmark.
5) Run the Section
An Important Reminder:
If you find any other tags, which you believe are incorrect or wrong, just simply write them in the
remove_tags line under your Global activation Tag at the very top of the 5th Section.
For example there were "clouds, tree, white border, character name" tags, which I don't want to see. So I write them in there and run the Section. Make sure to remove anything in other lines before you do so.Another way to Remove the tags straight away is write them after your Global Activation Tag in the search_tags line while you add tags already. Let's say I want to add "pleated dress" tag, but remove "sleeveless dress" just write it like this:
6) We've done that, great! Now let's make sure all of our tags got added.
Go to your Dataset and Reload your Page to update the txt files (Or press F5).
!Warning! Never be too quick with it. If you just ran the 5th Section, which had a lot of tags in the replace_with line give google a few seconds to catch up and then reload the page to see if it worked. If you are too quick about it, the .txt files might get corrupted and your LoRA will become a literally stain on your screen. In that case it's a full retrain. New Dataset Folder, Image again in, Tag them all, Sort them all and then get back to here.
You'll then see something like this in your text files.
Make sure that you didn't forget any tags to add and Global Activation Tag is still the first, Outfit Trigger Tag is 2nd, look at the outfit again and if needed add additional tags.. For example let's say I want to add "sideboob" to the tags, which I forgot.
Durandal aka. Global Activation Tag in top line, your tag in the bottom line. Now Important! Remove checkmark from new_becomes_activation_tag and then run the Section.
And with that we are done with this outfit! Hooray!
Now repeat the same process for every outfit.
Here are the steps in a nutshell to make it easier for you:
Change the Folder to the next Outfit Folder using Section 1.
Analyze Tags in Extras Section.
Check the Outfit Tags Ai gave you
Add Trigger Tag
Analyze the Outfit yourself and add correct Ai tags to all of your images + all of your correct tags while also removing wrong tags.
Check your Dataset outfit folder
Do the next Outfit until all of them are done
Here is my tagging for every other Durandal Outfit so you are not completely on your own.
Punk Outfit:
And as you can see here I removed a few wrong Tags Ai has put in there. By running the section like this I'll remove the top tags and add the bottom ones + The Trigger tag of course.
A few seconds later and a reload. Bam! That's another outfit done.
Don't forget to swap your Outfit Folders! It's Elf Outfit Time:
Now time for Story/Manga Outfit or whatever you wanna call it, I'm not sure myself...
It may seem like we have similar outfit here to the Punk outfit.
Because of the Jacket being cropped in both cases, but different colors and the fact that it's "long sleeves" here makes it okay. But we can add some other type of jacket just in case. For example: "sports jacket". It's not entirely correct, but we don't have to be 100% correct, even if it's 60% correct, it will work. Also both cases have crop top shirt. can't go around that too much, so you can put "black crop top, crop top, black shirt" that should already be different enough from the previous crop top which was "two-tone crop top".
Not much else here to analyse, so let's run it and get to the last outfit. Change folder, Analyse Tags, Analyse the outfit, Input new Tags and done.
Not much to do here either, it's a swimsuit with a few trinkets... What did you expect ?
With that we have all 5 Outfits fully tagged and ready to be trained on.
Let's terminate this session now and move on to the training part.
It won't let you start the trainer if you have another session already running.
Go back to the top and click on the XL LoRA Trainer and close this tab
Preparing the LoRA Trainer and Cooking the LoRA
If you got this far then congratulations we are in the final stretch!
And in case you thought the LoRA training settings might be hard to understand, don't worry... We are NOT touching a single thing!
I mean like seriously I don't know what most of these settings even mean and I'd rather not know.
Anyways let's get to cooking.
First of all don't worry about Google Colab stuff here, it will be defaulted to the GPU, which you need here anyways and it will automatically connect it for you when you start the process, so no worries.
1) Let's input your LoRA Folder name at the start in the project_name line
2) Make sure you have Pony Model chosen in the training_model line!
3) Set the Activation Tags amount in the Processing Section.
You will have 1 if you only have 1 outfit and 2 if you have multiple outfits.
You'll probably never use the options with 0 or with 3 (I managed to use 3 only once, but it was with Seele, who has two forms)
4) Warning! This Step is only if you have 1 Outfit!!
If you have more than 1 outfit this is literally useless and will do nothing!!
Set the number of repeats for your dataset.
The number depends on how many images you have
If you have:
10 Images x 40 Repeats
20 Images x 20 Repeats
30 Images x 12 Repeats
40 Images x 10 Repeats
50 Images x 8 Repeats
In a nutshell make sure to stay under 400 total. And if possible make sure the Total number can be divided by 4. Example 30x12=360, can be divided by 4. Overall good range for a single outfit is Total being between 360-400. You can go a bit lower or a bit higher than 400, but that range is what I found to be the most optimal.
5) Time to Scroll all the way down and find the Section we are here for. Extras Section.
We are here for this Cell.
There are 4 Variables in here that you need to know about.
The Line of Code itself, because you will be copying it for as many outfits as you have.
Number of Repeats of the Outfit Folder.
Name of the LoRA Folder (See /example/ in the code line? Replace it with your LoRA name)
Name of your Dataset Outfit Folder (See good/normal_images? Replace it with your Outfit Folder name.)
But before you start doing that let's figure out how many Repeats you will need.
I've already mapped out how many you need in each scenario.
And don't forget the amount of Images for each Folder I've already shown in the beginning, this is where the math starts.
The amount of images in your Outfit folder
/Multiplied By/
The number of repeats
/Equals/
Your Total Number
Example: Outfit folder with 20 images multiplied by 4 repeats is 80 Total.
Another thing to keep in mind: The number of repeats HAS TO BE at least 4.
If you have only 1-3 repeats Ai will not properly train on the outfit.
2 Outfits: Totals are 200 / 200
Example: So if you have let's say Folder with 50 Images and Folder with 20 Images
The repeats are going to be 4 for 1st and 10 for 2nd
3 Outfits: Totals are 120 / 120 / 120
Example: Images 1st) 30 2nd) 20 3rd) 8
Repeats 1st) 4 2nd) 6 3rd) 15
To be a bit more flexiable when it comes to 4 and 5 Outfits, it's fine if your Totals don't equal to 100. If you have 8 or 16 images in a folder, you can multiple that to get 96, it's not 100, but it's close. 8 x 12 = 96, 16 x 6 = 96. This will still work, but it's better to have them all at 100 if possible.
4 Outfits: Totals are 100 / 100 / 100 / 100
Example: Images 1st) 20 2nd) 10 3rd) 25 4th) 8
Repeats 1st) 5 2nd) 10 3rd) 4 4th) 12
5 Outfits: Totals are 100 / 100 / 100 / 100 / 100
Example: Images 1st) 20 2nd) 8 3rd) 25 4th) 16 5th) 10
Repeats 1st) 5 2nd) 12 3rd) 4 4th) 6 5th) 10
6 Outfits: Totals are 80 / 80 / 80 / 80 / 80 / 80
Example: Images 1st) 20 2nd) 20 3rd) 8 4th) 10 5th) 16 6th) 20
Repeats 1st) 5 2nd) 12 3rd) 4 4th) 6 5th) 10 6th) 4
With all of that information in hand, let's make this Cell look like it should.
Start by copying the code lines and pasting them until you have a line for each outfit.
Then change the Variables in each line. (Tip: CTRL + Backspace removes the entire section aka. the word Example or Good/normal_images in one click.)
Example => LoRA Name
Good/Normal_images => Outfit Folder Name
Num_repeats => Do some math and see what you will need.
Here is how it looks for my Durandal LoRA:
Images: 1st) 20 2nd) 16 3rd) 20 4th) 10 5th) 16
Repeats: 1st) 5 2nd) 6 3rd) 5 4th) 10 5th) 6
Now with all of that we are ready to start cooking. Press the Start Button in the Extras Section.
Once again it will ask you for permissions here and there, we of course Accept.
GPU will connect automatically after you click on this.
And then scroll all the way up to the Start Here - Setup Section and click the Start Button.
If everything you've done is correct you will see this at the start of your Log under Ready Section:
Now our LoRA is cooking, congratulations!
But stay Vigilant!! There is no point in training the LoRA this way for more than 3 Epochs. What I mean by that is simple: We don't Train Past 3rd Version of the LoRA.
May sound stupid to people who have trained LoRAs in the past, but this is how it works here. I've trained a lot of LoRAs this way and I always choose the 3rd option. Even when I forget to stop the Trainer and get 4th, 5th or even 6th Version of the LoRA, they are always worse than 3rd.
So I only train until 3rd, which also saves a LOT of GPU time usage, which is a big Plus in my book.
Another thing I gotta say: If for some reason your Trainer doesn't work and gives you some sort of an error. Check the error first, see if it has something to do with your files. (Most common would be Ai telling you: Dataset Name incorrect check it! Go down and see if you made a mistake, find it, fix it and run the Extras Section again, then Run the Trainer again.
Or you might get an Error with Ai Telling you: Something something request different size, expected was this, not this. That means you got 2 images with the same name, but different extensions. Remove one of those images and run the trainer again, yes you'll have not a perfect amount of Totals, but whatever it will still work)
If the issue is something else then check HollowStrawberry Github issues tab (https://github.com/hollowstrawberry/kohya-colab/issues), it might be a server wide issue aka. someone else is having the same problem as you. In that case you'll have to wait until the issue is resolved or someone has found a solution and wrote it in the comments under the post with the issue. HollowStrawberry themselves are gonna fix it as soon as they are available, usually it doesn't take too long. From an hour to a day, I'd say. But the issues like this are Rare, so don't worry.
Anyways back to the training screen and would you look at that we are already past the 3rd Epoch! Time to terminate the session in the same way we did back in the Dataset Maker and it's time to test our new LoRA!
Head to your LoRA Folder, go into Output folder and download 3rd Version of the LoRA.
Time to test it out!
Let's start with the first outfit.
Choose what tags you need from the .txt files, start generating and see what works. It might work with these tags, it might work without them here and there. Experiment until you find a good balance.
Durandal 1st Outfit check: Passed Durandal 2nd Outfit check: Passed
Durandal 3rd Outfit check: Passed
Durandal 4th Outfit check: Passed
Durandal 5th Outfit check: Passed
And that's a Wrap everyone! I hope your LoRA came out as good as mine did, because I'm personally very happy with the results! You can view my entire Durandal Dataset here in case you are still confused and what some more guidance: https://drive.google.com/drive/folders/1zVzonfQIGq0c_lHccwnxkV8LKzt-wm9u?usp=sharing
If your LoRA came out great write about it in the comments, post it and share it with everyone, I will be very happy to see it!
If it didn't come out as you wanted it to, no worries, comment about it or DM me, I will be happy to help you with it!
And of course for everyone who got this far, Songque Sensei gives full Marks!
I'll see you in the next LoRA or Guide!!