ogkalu2 / Merge-Stable-Diffusion-models-without-distortion

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
MIT License
139 stars 21 forks source link

Division by 0 error #13

Closed thojmr closed 1 year ago

thojmr commented 1 year ago

Using the latest code. Need an additional check to prevent division by 0. Was merging sd-v1-4 dreambooth model into sd-v1-5

FINDING PERMUTATIONS
Traceback (most recent call last):
  File "SD_rebasin_merge.py", line 72, in <module>
    new_alpha = y / (y + z)
ZeroDivisionError: division by zero
ogkalu2 commented 1 year ago

Fixed