Unable to Load Stable Diffusion 2.0 Custom Model ckpt (768-v-ema.ckpt)
Error output thrown to UI:
Error Traceback (most recent call last):
File "convert_model.py", line 42, in <module>
AssertionError: ('shape mismatch at', 'model.diffusion_model.input_blocks.1.1.proj_in.weight', [320, 320], (320, 320, 1, 1))
[27993] Failed to execute script 'convert_model' due to unhandled exception!
Trying to load the new Stable Diffusion model as a Custom Model.
More info:
- Apple M1 Pro
- 16 GB
- MacOS 13.0.1 (22A400)
- DiffusionBee Version 1.5.1 (0016)
Has anyone seen this, and is there a workaround for this? Or is this a known problem that requires code changes to add full support for?
Looks like it's encountering some error while running this script: https://github.com/divamgupta/diffusionbee-stable-diffusion-ui/blob/master/backends/model_converter/convert_model.py
Edit: Looks like it's erroring out at this point in execution: https://github.com/divamgupta/diffusionbee-stable-diffusion-ui/blob/925de50b1cd0c42ffec16563fc86e26e2732d2f7/backends/model_converter/convert_model.py#LL85C55-L85C63
I have a similar issue, cannot import a custom model
Error Traceback (most recent call last):
File "convert_model.py", line 47, in <module>
AssertionError
[3182] Failed to execute script 'convert_model' due to unhandled exception!
@theorhythm hopefully the next version fixes most imports of 1.4 and 1.5 based models.
@eshack94 the importer makes sure that the model is as expected. If you disable that check it will create the converted model but then Diffusion Bee will crash if you try to use it (at least the MPS version, I didn't try the TF version, maybe I should).
PS for any code spelunking, the linked script is not the version in DBee 1.5.1, you have to go back a commit. The logic in question is the same, though.
Same issue when trying to import Anything v3.0.
Same issue when trying to import Anything v3.0.
For Anything v3.0, I was able to import the fp16 pruned version. Try that one if you haven't.
However, I'm having problems importing any model that I have merged in AUTOMATIC1111 -- and the models I'm merging do import just fine on their own, such as Anything v3/hitokomoro and EimisAnime/Spiderverse. The error I get with it is on line 28 in module KeyError: 'state_dict' [37613] Failed to execute script 'convert_model' due to unhandled exception!
A few other models I've downloaded from Huggingfaces also didn't import for me. I don't remember which ones, however.
Same issue. I found a workaround by using this tool here: https://github.com/eyriewow/merge-models
I ran a quick merge with 2 models which themselves imported previously on their own. It imported no problem, whereas prior trying AUTOMATIC1111 merging would result in the same error.
However using models that didn't import before resulting 'state_dict' cause the same error to appear using the linked merge script.
Thanks for the tip, @MDMAchine. As you said, the merge-models utility worked just fine. It serves as a good workaround for those who are comfortable using git and python from the terminal, but probably most DiffusionBee users are not. I'm glad to have it though. 😄
Had the same issue when trying, within settings, to run V2.1 of Stable Diffusion as a "custom model". If the merge utility works, that could be a workaround. How would this work with the 2.1 checkpoint?
@metaphorz It likely will not work, DiffusionBee appears to import/convert similar to the script I linked. So if you use the script for any models that failed while importing into DiffusionBee they will fail with the same error.
Edit: Its been addressed #319 for next update. Thanks @CrudeDiatribe
Same issue. Trying to load Protogen models. It's throwing this error:
Error Traceback (most recent call last):
File "convert_model.py", line 28, in <module>
KeyError: 'state_dict'
[24812] Failed to execute script 'convert_model' due to unhandled exception!
@Bangkokian PR #319 fixes this, just waiting for a new version of the app to include it.
In the meantime , I’ve been using the automatic1111 webui which has many options and will load multiple SD checkpoints
The mac app is 1.5.1, from what I understand it's still the version with the bug. Do you have any date to publish the fix?
The mac app is 1.5.1, from what I understand it's still the version with the bug. Do you have any date to publish the fix?
On the GitHub page, under releases you can find 1.5.2 which includes the updated importer which should import the 1.4/1.5 based models that were failing.
@CrudeDiatribe I understood. the fix only happens for 1.4/1.5 versions. So it is currently not possible to import the 2.1 model?
In model v2.1-768px I am having a similar error from this issue:
Error Traceback (most recent call last): File "convert_model.py", line 85, in
AssertionError: ('shape mismatch at', 'model.diffusion_model.input_blocks.1.1.proj_in.weight', [320, 320], (320, 320, 1, 1)) [98815] Failed to execute script 'convert_model' due to unhandled exception!
More info:
Apple M1 - 16 GB MacOS 13.2.1 (22D68) DiffusionBee Version 1.5.2 (0016)
So it is currently not possible to import the 2.1 model?
Correct.
And this is still the case unfortunately 👎
And this is still the case unfortunately 👎
Are you using the latest release from Github? SD2.x support was added per the release notes.