lora-training / koharu /README.md
khanon's picture
initial commit
7529c6f
|
raw
history blame
4.68 kB
# Shimoe Koharu (Blue Archive)
Changed training methodology around for Koharu. It took way more time and effort due to the degree of manual tagging involved, but it turned out pretty well.
I'll probably return to this one later to make further improvements now that I've got a much better handle on the impact of tagging and how to get the most out of larger datasets. I don't expect to manual tag every future student, though.
## Usage
Use any or all of these tags to summon Koharu:
`koharu, 1girl, halo, pink eyes, ringed eyes, head wings, low wings, pink hair`
Unlike previous LoRAs, the character's name does help this one somewhat. You can probably omit her hair to save tokens.
The vertical line running down her body appears consistently, but may not always reach past her chest because artists are inconsistent in how they draw it. You can try to describe it literally: "vertical black line running past navel" or whatever. Don't try `tattoo` unless you want womb tattoos.
It does a decent, but not perfect job with her eyes. Adding some combination of `embarrassed`, `open mouth`, `swirly eyes` with varying degrees of emphasis can draw out her characteristic horny retard look.
I tried to add the slit pupils expression and the model sorta gets it, but not very well. You can prompt it with `slit pupils` and `flustered` but it generally creates abominations.
For her normal Trinity outfit:
`school uniform, off shoulder, hat, skirt`
Some of her swimsuits are in there too.
Weights from 0.8 - 1.05 should work well.
### Important
This LoRA may be more aggressive than others in forcing a close-up/portrait camera. I believe this is because I scraped Booru tags for this one, and WD1.4 more reliably tags camera angles and image composition than human taggers. You can mitigate this by always prompting for an angle or composition tag, like `above waist` or `cowboy shot` or `from above`. You can combine them, too.
Trying to prompt Koharu from behind or the side generally doesn't work very well -- it can render her back if you use `from behind` and `back focus`, but her wings will be attached to her stomach and her halo will be flipped,because the AI doesn't know how to generalize those traits to different angles and there's not enough training data for them.
## Training
*All parameters are provided in the accompanying JSON files.*
Koharu's training was handled substantially differently.
- Trained on a heavily curated set of 183 images, most repeated 6 times. 1150 total steps.
- Dataset included a mixture of SFW and NSFW.
- Doubled the number of steps because the dataset was larger than usual. I typically target 450 - 650.
- New tagging methodology. No WD1.4 tags; instead I scraped tags from Sankaku Complex using Hydrus and manually cleaned them up.
- Removed tons of shit tags
- Made sure important traits were present and consitently described, and traits like `halo` were consistent with actual visibility
- Pruned lots of redundant tags and simplified outfits. There is no `black serafuku, long sleeves`, only Koharu's `school uniform`.
- Added camera angles and image composition hints
- Added facial expressions (particularly `embarrassed`) and unusual pupils when present
- Different learning rate than usual.
- 5e-5 text encoder (typically 1e-5 ~ 2e-5)
- 2e-4 UNet (typically one order of magnitude faster than text)
- This was experimental -- human tags tend to be more varied, allowing for more expressiveness (WD1.4 did not do a good job with her) but potentially requiring more training. The dataset was also larger.
- VAE removed. I usually train the dataset on the NAI VAE but after some tests, I think this was leading to oversaturated outputs and it does not play nicely with alternative VAEs.
- May offer a No VAE and a WD1.4 VAE in the future as these seem to present the best results across many configurations
While I think the experimental things I tried out with this dataset worked out well enough to be called a success, tag cleanup took literal hours and I will probably not be able to put nearly so much effort into every character. I just really like Koharu. I will probably retrain some old ones with at least the new hyperparameter methodologies, though.
## To-do
- More consistently tag NSFW/SFW/nudity
- Add more image composition/camera angle tags
- Find additional images with prominent swirly eyes
- Improve tags for socks/shoes
- Remove `halo` tag from images where it is just barely visible to force camera to pull further away
- Un-fuck wings from side angle (folded wings tag?)
- Add `looking away` / `facing away` to applicable images because it is impossible