thygate / stable-diffusion-webui-depthmap-script

High Resolution Depth Maps for Stable Diffusion WebUI
MIT License
1.7k stars 160 forks source link

new startup issue error loading depthmap.py #113

Open gsgoldma opened 1 year ago

gsgoldma commented 1 year ago

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'

lauridskern commented 1 year ago

same error

thygate commented 1 year ago

force reinstall a recent version of timm

pip install --force-reinstall timm==0.6.12

gsgoldma commented 1 year ago

pip install --force-reinstall timm==0.6.12

doing that broke my current install

thygate commented 1 year ago

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

gsgoldma commented 1 year ago

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 commented 1 year ago

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.

thygate commented 1 year ago

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.

lintonxue00 commented 1 year ago

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'

Woisek commented 1 year ago

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'

jwvanderbeck commented 1 year ago

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?