Merge-Stable-Diffusion-models-without-distortion icon indicating copy to clipboard operation
Merge-Stable-Diffusion-models-without-distortion copied to clipboard

SD 2.x model merge broken (or just not implemented yet)

Open gxmikvid opened this issue 2 years ago • 3 comments

First of all, great work, used this back then to screw around with models.

Got back into SD, tried to merge 2.x models, got this error: KeyError: 'cond_stage_model.model.transformer.text_model.embeddings.position_ids' Any 2.x model does this! Removed ema as per this issue.

Tried some of the fixes proposed. This was the closest to my problem, proposed solutions did nothing, i assumed the code was not made to handle SD 2.x. Perhaps it has a different/no clip model. There was an issue that detailed it but can't find it at the moment.

Are you planning on supporting 2.x models any time soon? There was an issue that asked a similar question but about 1.x-2.x cross merging, and i feel like my request is different enough.

Love this repo. No rush.

gxmikvid avatar Jul 23 '23 23:07 gxmikvid

@gxmikvid

Hi. Merging 2.x models can be done but it's something I'd have to support in the code first. To be honest, I didn't really have any particular plans to support it since the models seem to be used much less than 1.5 but I'll see what I can do.

ogkalu2 avatar Jul 30 '23 22:07 ogkalu2

Thank you so much. Also, I saw your answer to this too late, so my question might have been redundant. Sorry for that, my bad.

gxmikvid avatar Aug 01 '23 18:08 gxmikvid

Write the permutation spec dedicate for the SD2.X will be good. I may have a try since SD2 is a subset of SDXL, but the layer name is different Also I need some more trick to detect a SD2.X model.

Edit: PR has been made

6DammK9 avatar Apr 28 '24 08:04 6DammK9