wkpark / sd-webui-model-mixer

Checkpoint model mixer/merger extension
GNU Affero General Public License v3.0
96 stars 4 forks source link

[Feature request] merge methods #113

Open Enferlain opened 5 months ago

Enferlain commented 5 months ago

Thank you, this is a great addition for the merger space, but just wanted to ask if you thought about adding various merge_methods?

https://github.com/s1dlx/meh/blob/81515bda3cba52edd263964c5517f4713faad86e/sd_meh/merge_methods.py

Most up to date: https://github.com/ljleb/sd-mecha/blob/main/sd_mecha/merge_methods.py

wkpark commented 5 months ago

thank you for your information!

wkpark commented 4 months ago

Please see https://github.com/wkpark/sd-webui-model-mixer/discussions/35

wkpark commented 4 months ago

this routines are tensor level, it means it could be applied to the model-mixer easily. but also we need to check each algorthm and its meaning and it's speed.

ljleb commented 4 months ago

There is a more up to date set of merge method implementations: https://github.com/ljleb/sd-mecha/blob/main/sd_mecha/merge_methods.py

Everything marked as @convert_to_recipe is a merge method.

I can explain any/all of them if you want, as I came up with most of them. You can decide whether any is worth implementing. rotate is the slowest one, it takes ~1h on sdxl and ~9 minutes on sd1.5.

ljleb commented 4 months ago

All merge methods are key-level. I omitted weighted sum and add difference as they are trivial.

I apologize if this is too much text to read. Let me know if I can clarify anything.