Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

All models except midas give a KeyError #53

Open
magestyx opened this issue May 9, 2023 · 0 comments
Open

All models except midas give a KeyError #53

magestyx opened this issue May 9, 2023 · 0 comments

Comments

@magestyx
Copy link

magestyx commented May 9, 2023

I'm using the latest Stable Diffusion and depthmap2mask. I've tried using all the models, and they download fine but only the midas ones work. All others give an error 'Loading midas model weights'. Every model that starts with 'dpt' gives a KeyError.

Traceback (most recent call last):
File "C:\stable-diffusion\stable-diffusion-webui-master\modules\call_queue.py", line 57, in f
res = list(func(*args, **kwargs))
File "C:\stable-diffusion\stable-diffusion-webui-master\modules\call_queue.py", line 37, in f
res = func(*args, **kwargs)
File "C:\stable-diffusion\stable-diffusion-webui-master\modules\img2img.py", line 179, in img2img
processed = modules.scripts.scripts_img2img.run(p, *args)
File "C:\stable-diffusion\stable-diffusion-webui-master\modules\scripts.py", line 407, in run
processed = script.run(p, *script_args)
File "C:\stable-diffusion\stable-diffusion-webui-master\extensions\depthmap2mask\scripts\depth2image_depthmask.py", line 97, in run
d_m = sdmg.calculate_depth_maps(p.init_images[0],img_x,img_y,model_type,invert_depth)
File "C:\stable-diffusion\stable-diffusion-webui-master\extensions/depthmap2mask/scripts/depthmap_for_depth2img.py", line 294, in calculate_depth_maps
model, transform = load_model(device, model_path, models[model_type_index], (img_x, img_y))
File "C:\stable-diffusion\stable-diffusion-webui-master\extensions/depthmap2mask/scripts/depthmap_for_depth2img.py", line 41, in load_model
model = DPTDepthModel(
File "C:\stable-diffusion\stable-diffusion-webui-master\repositories\midas\midas\dpt_depth.py", line 102, in init
super().init(head, **kwargs)
File "C:\stable-diffusion\stable-diffusion-webui-master\repositories\midas\midas\dpt_depth.py", line 55, in init
hooks=hooks[backbone],
KeyError: 'beitl16_512'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant