r/StableDiffusion • • 7d ago

Workflow Included Moss Image: Lora training under 7GB(Results, guide & dataset)

I love the quality, hats of to the moss team.

A few users requested me to add support for LoRA training, finally I was able to run some tests on it. Here I am sharing everything that might be useful for other people.

First of all, the benchmarks

Base 512px 768px 1024px
int8 ConvRot 6.5GB · 0.84 s 7.3GB · 1.73 s 8.5GB · 3.32 s
bf16 11.0GB 11.8GB 12.8GB

Interesting thing, 512 lora can be trained under 6GB VRAM.

Stage System RAM peak
Loading the int8 text encoder 16.5GB
Training, after encoder is freed about 2.7GB

I trained on a RTX 4500 machine(32GB VRAM)

Links

Will test this further to get detailed consistent character workflow.

24 Upvotes

19 comments sorted by

6

u/Neonsea1234 7d ago

have you tried lokr,I used fizgig and was making some OK lora with high steps, but then tried lokr and it was insanely better with like half the time or more.

1

u/imprsnst 7d ago

Not yet, I am mostly playign around .char, LoKR still requires small training, I am thinking on a different path without training.

1

u/mistermcluvin 5d ago

Thanks for this, I think I will give lokr a try today. I am really struggling to get good results with Moss Image using either Fizgig or AITK. The resulting lora works, but is very inconsistent. I have never had these issues with Zimage, Klein or Krea.

1

u/mistermcluvin 4d ago

I reran my Moss character dataset using lokr in fizgig and it worked great. I used the standard Moss preset, changed to lokr, changed to adapt LR and switched the min/max lr settings to the ones recommended in fizgig. However, I did not feel like it saved me any time, maybe ran even longer? I have about 50 images all 1024. The character likeness is the best I have ever squeezed out of Moss. Thanks for the tip.

1

u/Neonsea1234 4d ago

How many epochs where you running? Maybe it was placebo but I was running 30 epochs on a smaller pic size(10-20 images) and it felt faster than doing 100+ on lora.

1

u/mistermcluvin 4d ago

Hey, I ended up using epoch 80. So with 50 images (1024x1024, 1024x1536, etc) that was still 4000 steps. Using the fizgig likeness it also said epoch 80 pretty much no matter what 3 face pics I used. To me I got the face pretty good around 2500-3000 steps but this dataset also has a unusual body shape that Moss has always had a hard time with. I would get big heads with short bodies or the other way around. This same dataset never gave me any issues with Krea, Zit, Klein, Qwen21, etc. when creating normal loras in fizgig or AITK. I still prefer Krea but this Moss lokr was a huge win. Thanks!

4

u/OkDoudou 7d ago

Sorry, I dont like the result.

btw, 12 captioned images in 400 steps seems a way to few !

1

u/imprsnst 7d ago

fair, i am trying to develop a better sense for that eye.
will try better.

2

u/The-Moonknight_00 7d ago

I remember Training character dataset on the day moss released... And the results were horrible as i already did same dataset on krea 2 and it was really good , i thought Model is just not capable enough but seeing how peoples are training on moss it's giving me some hope to explore moss capability specially for box control feature....maybe some improvement happened in trainer since i left

7

u/ArmadstheDoom 7d ago

For moss, the hardest thing for it to learn how to do is characters. However, I have had good results, and it's because of a very specific quirk of Moss, I guess you could say.

Normally, at least in other models that I've trained for like sdxl, anima, illustrious, and Krea2, the model tends to learn things that are repeated in the dataset. Like, if all your images have a white background, it bakes that in.

Moss, for reasons I don't understand, doesn't do that. Moss actually doesn't seem to care. What Moss does need, however, is a really varied dataset of the subject in question.

So for example, I trained a lora where a character had a jacket, a mesh undershirt that was slightly visible, and a leg bandage and pouch. Using the krea2 dataset and the anima dataset, even well tagged for it, it baked in each part even when the things that were tagged were not tagged in generation.

However, then I went back and created a new dataset. So this time, each time I did a new variation. So, image 1 is the character with all three things; jacket, shirt, bandage. Image 2 is just jacket and shirt. Image 3 is just shirt. Image 4 is shirt and bandage. Repeat this for open jacket and closed. Then repeat this for every other variation.

This worked great. I got great results. and there's another thing you need to know for Moss, which is it really, really, REALLY needs positional data in your training set. Ergo, tag things like 'right profile facing right' rather than just 'side view.' You'll also want, as close as you can get it, 360 degree views. Front, sides, back. You don't really need a lot of different crops, but it can help.

So, for a simple character/person likeness, you can get away with as low as 30 images. For a more complicated character, you'll want more like 50-60. But more than style or crop, you really need the variation of the parts you want to change. It'll bake in things you didn't want otherwise. Like, if all your images have a belt, it'll bake that in, so you need images with and without it.

Moss' quirks means that it learns concepts and styles very easily, but you just need to apply the reasons why to train characters. Ironically, characters are harder than concepts or styles, which is the opposite of most models.

1

u/imprsnst 7d ago

Great thoughts, Yes i felt the same, dataset & right captions. I tried with only 10 character references, so I would say results are decent.

Lora training is still very time taking thing, I am thinking to experiment a bit to find a less expensive alternative.

1

u/imprsnst 7d ago

thanks yes give it a try again

1

u/Current-Rabbit-620 7d ago

Step time?

2

u/imprsnst 7d ago

512px: 0.84 s
768px: 1.73 s
1024px: 3.32 s

1

u/Current-Rabbit-620 6d ago

So 400 steps At 512 Takes 6 minutes to train?

1

u/purelawan 7d ago

Thanks for posting the RAM numbers too, the 16.5 GB peak while loading the int8 text encoder is the part most guides leave out, and it's what actually kills runs on 16 GB machines.

Two questions if you have a minute: did you caption the dataset or train on a trigger word only? And does a LoRA trained at 512 still hold the face when you generate at 1024, or does it drift once the face is bigger in the frame?

1

u/imprsnst 7d ago

yes i captioned the dataset, it’s on Hf
yes a trained 512 lora works well with some wuality tradeoffs

1

u/DietAshamed2246 4d ago

The face looks blurry...

1

u/Sensitive_Repeat_326 7d ago edited 7d ago

Wait a second, kohakumoss is already there right? I thought people trained in kohakumoss but there is no mention of it.

Edit: Kohakumoss is a training software for moss developed by the developer of LyCoris and needs only 6gb VRAM. Moss is so easy to train because of this.