fast-stable-diffusion icon indicating copy to clipboard operation
fast-stable-diffusion copied to clipboard

Checkpoint Merger error

Open DJTcode opened this issue 2 years ago • 12 comments

I got the following error while trying to merge sd-v1-5-inpainting.ckpt with a dreambooth .ckpt:

Merging... 0% 0/1131 [00:00<?, ?it/s] Error loading/saving model file: Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/ui.py", line 1681, in modelmerger results = modules.extras.run_modelmerger(*args) File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/extras.py", line 293, in run_modelmerger if key in theta_2: TypeError: argument of type 'NoneType' is not iterable

Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/gradio/routes.py", line 274, in run_predict fn_index, raw_input, username, session_state, iterators File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 746, in process_api predictions = self.postprocess_data(fn_index, result["prediction"], state) File "/usr/local/lib/python3.7/dist-packages/gradio/blocks.py", line 700, in postprocess_data if predictions[i] is components._Keywords.FINISHED_ITERATING: IndexError: list index out of range

DJTcode avatar Nov 15 '22 13:11 DJTcode

They have a different architecture, I don't think they are compatible

TheLastBen avatar Nov 15 '22 14:11 TheLastBen

I'm trying to load sd-v1-4.ckpt when i launch, but the web-ui still has the sd-v1-5-inpainting.ckpt. How can I use the sd-v1-4.ckpt so i can merge?

DJTcode avatar Nov 15 '22 18:11 DJTcode

there is a dropdown menu from which you chose the model

TheLastBen avatar Nov 15 '22 19:11 TheLastBen

Yes this works when I only load the sd-v1-4.ckpt model, but if I insert link to a trained dreambooth model, then when the web-ui is launched the only other model in the dropdown menu is the sd-v1-5-inpainting.ckpt. What can we merge our dreambooth models with?

DJTcode avatar Nov 16 '22 00:11 DJTcode

Put all the models in one folder, then put the link to that folder into path_to_model.

TheLastBen avatar Nov 16 '22 04:11 TheLastBen

I now see all the models in the drop down list, thanks. I seem to be unable to merge any of my models so I assume they are incompatible - I trained them using your Dreambooth colab. Are these models compatible for merging?

DJTcode avatar Nov 16 '22 20:11 DJTcode

what type of merging are you using, there are two options

TheLastBen avatar Nov 16 '22 21:11 TheLastBen

I was using add difference, but weighted sum works. This issue is resolved for me, thank you.

DJTcode avatar Nov 17 '22 00:11 DJTcode

Probably not enough RAM to handle all 3 models.

GuruVirus avatar Nov 17 '22 06:11 GuruVirus

the add difference method doesn't work, I'm not sure if it works locally

TheLastBen avatar Nov 17 '22 07:11 TheLastBen

the add difference method doesn't work, I'm not sure if it works locally

Do you mean in your repo, or in general? I know people that are using add diff successfully, but may not be using this.

GuruVirus avatar Nov 19 '22 04:11 GuruVirus

I'm not sure locally, I'm gonna have to try it

TheLastBen avatar Nov 19 '22 05:11 TheLastBen