Open User1231300 opened 1 year ago
Hi that looks like you ran out of memory. Try the new commit. It's optimized. See if it works now
It's not working. Can you add a clear list of requirements?
Really the only requirement is
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0 --extra-index-url https://download.pytorch.org/whl/cu113
I'm having the same issue on Google Colab, but worse. It crashes right away at first iteration.
/content/merger
Using half precision
---------------------
ITERATION 1
---------------------
new alpha = 0.045
^C
Code:
!pip install pytorch-lightning torch==1.11.0+cu113 torchvision==0.12.0+cu113
!git clone https://github.com/ogkalu2/Merge-Stable-Diffusion-models-without-distortion merger
%cd /content/merger
#download models from hf
!curl ...
model_a_path = "novelai.ckpt"
model_b_path = "sd_1.5.ckpt"
output_name = f"NAI_f222_0.45ws.ckpt"
alpha = 0.45
%cd /content/merger
!python SD_rebasin_merge.py --model_a {model_a_path} --model_b {model_b_path} --output {output_name} --alpha {alpha}
They're both 4GB checkpoints (fp32). Here's RAM usage:
By the way it seems to need one more requirement: pytorch-lightning EDIT: Nvm, it's required by the checkpoint pickle
Anyway, I'll try using GPU
I installed torch==1.11.0
when trying to merge i get this
Using half precision
new alpha = 0.05
FINDING PERMUTATIONS P_bg337: -0.5 P_bg324: -0.5 P_bg358: -0.125 P_bg324: 0.5 0.42857142857142855
new alpha = 0.05263157894736836
FINDING PERMUTATIONS P_bg358: 0.0625 P_bg337: 1.0 ^C
How to fix?