Nerogar / OneTrainer

OneTrainer is a one-stop solution for all your stable diffusion training needs.
GNU Affero General Public License v3.0
1.35k stars 114 forks source link

[Feat]: per-concept (or image) masking #238

Open yggdrasil75 opened 3 months ago

yggdrasil75 commented 3 months ago

Describe your use-case.

I am training a lora on some characters. some of the characters have more interaction with the background of the image (ie: halfway behind a door) and some have less (ie: leaning on a table) I would like to experiment with setting the % masked rate for the images separately

What would you like to see as a solution?

an option is set the mask probability on the concept another option is setting it in the filename. for instance: -masklabel..png (12345-masklabel.0.9.png maybe) next option is folder. ie: \0.9\ for 0.9 probability

Have you considered alternatives? List them here.

an alternative I may use is just duplicating the images, sometimes with a mask, sometimes without. this will work, but will be highly impractical done manually. I may do it with a short script, but that still feels like a bad idea. on windows it will mean much greater space used unless its done via hardlinks.

mx commented 2 months ago

Not saying I'm interested in implementing this particular request, but side note about it: I've seen a couple feature requests now that involve some sort of per-image parameter. It's getting to the point that we ought to consider having each image have a configuration file (textproto, jsonnet, raw json, whatever) that defines those parameters (desired resolution, mask rate, what have you). Keeping everything in the filename is going to be a path to madness if multiple of these requests get implemented.