stable-diffusion-webui-depthmap-script icon indicating copy to clipboard operation
stable-diffusion-webui-depthmap-script copied to clipboard

new startup issue error loading depthmap.py

Open gsgoldma opened this issue 2 years ago • 10 comments

Error loading script: depthmap.py Traceback (most recent call last): File "D:\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "D:\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "D:\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 40, in from midas.dpt_depth import DPTDepthModel File "D:\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\midas\dpt_depth.py", line 5, in from .blocks import ( File "D:\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\midas\blocks.py", line 4, in from .backbones.beit import ( File "D:\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\midas\backbones\beit.py", line 9, in from timm.models.beit import gen_relative_position_index ModuleNotFoundError: No module named 'timm.models.beit'

gsgoldma avatar Feb 14 '23 16:02 gsgoldma

same error

lauridskern avatar Feb 14 '23 17:02 lauridskern

force reinstall a recent version of timm

pip install --force-reinstall timm==0.6.12

thygate avatar Feb 15 '23 01:02 thygate

pip install --force-reinstall timm==0.6.12

doing that broke my current install

gsgoldma avatar Feb 15 '23 02:02 gsgoldma

can't help you if you don't give me any info

thygate avatar Feb 15 '23 02:02 thygate

can't help you if you don't give me any info

My apologies. I forgot to capture the error log, and I deleted the venv for a fresh install. Next time I try it out, I'll capture the log.

gsgoldma avatar Feb 15 '23 02:02 gsgoldma

Edit: Surprise surprise, it's conflicting with the extension 'unprompted' again. Same error comes up when I added unprompted back in. Except before, unprompted wouldn't work, but depthmap would. Now depth map doesn't work, but unprompted does when they're both in the extensions folder.

I'll let him know about it too.

In the end, I don't think the timm version was the issue (in the launch file it's the same one); it's almost certainly an extension conflict. I loaded it up by itself without issue. Now off to see which one is conflicting with it.

gsgoldma avatar Feb 15 '23 19:02 gsgoldma

The error message in the original post indicates you were using an old timm version that did not yet have the beit models. The new midas models will not work without it, possibly another extension is still installing the old version.

thygate avatar Feb 15 '23 19:02 thygate

Error loading script: depthmap.py Traceback (most recent call last): File "/content/drive/MyDrive/stable-diffusion-webui/modules/scripts.py", line 229, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "/content/drive/MyDrive/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 848, in exec_module File "", line 219, in _call_with_frames_removed File "/content/drive/MyDrive/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/depthmap.py", line 40, in from midas.dpt_depth import DPTDepthModel File "/content/drive/MyDrive/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/midas/dpt_depth.py", line 5, in from .blocks import ( File "/content/drive/MyDrive/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/midas/blocks.py", line 4, in from .backbones.beit import ( File "/content/drive/MyDrive/stable-diffusion-webui/extensions/stable-diffusion-webui-depthmap-script/scripts/midas/backbones/beit.py", line 9, in from timm.models.beit import gen_relative_position_index ModuleNotFoundError: No module named 'timm.models.beit'

lintonxue00 avatar Feb 16 '23 12:02 lintonxue00

Same here:

Error loading script: depthmap.py Traceback (most recent call last): File "I:\Super SD 2.0\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "I:\Super SD 2.0\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "I:\Super SD 2.0\stable-diffusion-webui\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 40, in from midas.dpt_depth import DPTDepthModel File "I:\Super SD 2.0\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\midas\dpt_depth.py", line 5, in from .blocks import ( File "I:\Super SD 2.0\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\midas\blocks.py", line 4, in from .backbones.beit import ( File "I:\Super SD 2.0\stable-diffusion-webui\extensions/stable-diffusion-webui-depthmap-script/scripts\midas\backbones\beit.py", line 9, in from timm.models.beit import gen_relative_position_index ModuleNotFoundError: No module named 'timm.models.beit'

Woisek avatar Feb 19 '23 08:02 Woisek

My concern with the suggestion to force install timm 0.6.12 is that A1111 itself has a requirement defined as timm 0.4.12

How can two versions exist at the same time?

jwvanderbeck avatar Jun 24 '23 14:06 jwvanderbeck