ljleb / sd-mecha

Executable State Dict Recipes
MIT License
50 stars 4 forks source link

Add support for pix2pix and inpainting models #5

Open ljleb opened 8 months ago

ljleb commented 8 months ago

Merging a pix2pix or inpainting model with a normal model yet does not work. We need to catch dimension mismatches in the shapes of the tensors and take appropriate action. We need to look around on github, I'm pretty sure there is code for this already somewhere.

Enferlain commented 8 months ago

This?

https://github.com/vladmandic/automatic/blob/3c952675fefd2c94b817940ffbd4cd94fd5876c9/modules/merging/merge.py#L335

ljleb commented 8 months ago

Yes, but I'm not sure this is how it's supposed to be done. Instead of ignoring the keys, we should test slicing, merging and concat. I forgot to specify this in the OP, thanks.