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

Adaptation of the merging method described in the paper - Git Re-Basin: Merging Models modulo Permutation Symmetries (https://arxiv.org/abs/2209.04836) for Stable Diffusion

Results 20 Merge-Stable-Diffusion-models-without-distortion issues
Sort by recently updated
recently updated
newest added

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...

Do you have any plans to Develop a PermutationSpec for SDXL? If not, would you be so kind as to explain a bit more how you arrived at the one...

From the paper, I see Algorithm 1 and 2 are implemented. Using `scipy` for the SOLVELAP look nice to me. However in the bottom session, there is one more algorithm...

Hi, I'm interested in understanding what the code does. ``` **easyblock("model.diffusion_model.output_blocks.6.0", "P_bg208","P_bg209"), **conv("model.diffusion_model.output_blocks.6.0.skip_connection","P_bg210","P_bg211"), **norm("model.diffusion_model.output_blocks.6.1.norm", "P_bg212"), **conv("model.diffusion_model.output_blocks.6.1.proj_in", "P_bg212", "P_bg213"), **dense("model.diffusion_model.output_blocks.6.1.transformer_blocks.0.attn1.to_q", "P_bg214", "P_bg215", bias=False), ``` in some sections, the bg's are disconnected...

on line: 55 ` theta_0 = {key: (1 - (new_alpha)) * theta_0[key] + (new_alpha) * value for key, value in theta_1.items() if "model" in key and key in theta_1}` and...

Error: ``` /content/merger Using half precision --------------------- ITERATION 1 --------------------- new alpha = 0.045 Traceback (most recent call last): File "SD_rebasin_merge.py", line 55, in theta_0 = {key: (1 - (new_alpha))...

I installed torch==1.11.0 when trying to merge i get this Using half precision --------------------- ITERATION 1 --------------------- new alpha = 0.05 FINDING PERMUTATIONS P_bg337: -0.5 P_bg324: -0.5 P_bg358: -0.125 P_bg324:...

Using half precision --------------------- ITERATION 1 --------------------- new alpha = 0.05 Traceback (most recent call last): File "I:\Dreambooth-Stable-Diffusion\Merge-Stable-Diffusion-models-without-distortion\SD_rebasin_merge.py", line 55, in theta_0 = {key: (1 - (new_alpha)) * theta_0[key] +...

Lot of people have trouble running it, this would make it easier , also providing a colab notebook that was tested and working would be great

I have merged two dreambooth models (A.ckpt and B.ckpt). The default parameters (alpha and ITERATION) are used. The size of the merged file (merged. ckpt) is the same as A...