thygate / stable-diffusion-webui-depthmap-script

High Resolution Depth Maps for Stable Diffusion WebUI
MIT License
1.71k stars 159 forks source link

Error when tying to generate mesh and videos #185

Open kornerson opened 1 year ago

kornerson commented 1 year ago

Im trying to generate a video with the new models: zoedepth-nk and I get this error

KeyError: 'beitl16_384'

This is the stack content

Arguments: (0, <PIL.Image.Image image mode=RGB size=960x1280 at 0x1E930255A80>, [<tempfile._TemporaryFileWrapper object at 0x000001E930256CE0>, <tempfile._TemporaryFileWrapper object at 0x000001E9302568C0>, <tempfile._TemporaryFileWrapper object at 0x000001E930255A50>, <tempfile._TemporaryFileWrapper object at 0x000001E930257490>, <tempfile._TemporaryFileWrapper object at 0x000001E9302566E0>, <tempfile._TemporaryFileWrapper object at 0x000001E930256C50>, <tempfile._TemporaryFileWrapper object at 0x000001E82E35CEB0>, <tempfile._TemporaryFileWrapper object at 0x000001E930256380>, <tempfile._TemporaryFileWrapper object at 0x000001E92FF802E0>, <tempfile._TemporaryFileWrapper object at 0x000001E92FF811B0>, <tempfile._TemporaryFileWrapper object at 0x000001E92FF83D00>, <tempfile._TemporaryFileWrapper object at 0x000001E92FF81E10>, <tempfile._TemporaryFileWrapper object at 0x000001E92FF82950>, <tempfile._TemporaryFileWrapper object at 0x000001E92FF81240>], '', '', 0, 9, 512, 512, False, True, False, False, 0, 1, False, 1, True, True, False, False, ['left-right', 'red-cyan-anaglyph'], 2.5, 'polylines_sharp', 0, True, True, False, False, False, 'u2net', False, 0, 2, False, None, True, False, True, False) {} Traceback (most recent call last): File "C:\StableDifussionServers\SD-SRV003\modules\call_queue.py", line 56, in f res = list(func(*args, kwargs)) File "C:\StableDifussionServers\SD-SRV003\modules\call_queue.py", line 37, in f res = func(args, kwargs) File "C:\StableDifussionServers\SD-SRV003\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 1171, in run_generate outputs, mesh_fi, meshsimple_fi = run_depthmap( File "C:\StableDifussionServers\SD-SRV003\extensions\stable-diffusion-webui-depthmap-script\scripts\depthmap.py", line 461, in run_depthmap model = build_model(conf) File "C:\StableDifussionServers\SD-SRV003\extensions/stable-diffusion-webui-depthmap-script/scripts\dzoedepth\models\builder.py", line 51, in build_model return get_version(config.version_name).build_from_config(config) File "C:\StableDifussionServers\SD-SRV003\extensions/stable-diffusion-webui-depthmap-script/scripts\dzoedepth\models\zoedepth_nk\zoedepth_nk_v1.py", line 333, in build_from_config return ZoeDepthNK.build(config) File "C:\StableDifussionServers\SD-SRV003\extensions/stable-diffusion-webui-depthmap-script/scripts\dzoedepth\models\zoedepth_nk\zoedepth_nk_v1.py", line 323, in build core = MidasCore.build(midas_model_type=midas_model_type, use_pretrained_midas=use_pretrained_midas, File "C:\StableDifussionServers\SD-SRV003\extensions/stable-diffusion-webui-depthmap-script/scripts\dzoedepth\models\base_models\midas.py", line 341, in build midas = torch.hub.load("intel-isl/MiDaS", midas_model_type, File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\torch\hub.py", line 542, in load model = _load_local(repo_or_dir, model, args, kwargs) File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\torch\hub.py", line 572, in _load_local model = entry(*args, kwargs) File "C:\Users\adminogilvy/.cache\torch\hub\intel-isl_MiDaS_master\hubconf.py", line 38, in DPT_BEiT_L_384 model = DPTDepthModel( File "C:\StableDifussionServers\SD-SRV003/extensions/deforum/scripts/deforum_helpers/src\midas\dpt_depth.py", line 102, in init super().init(head, kwargs) File "C:\StableDifussionServers\SD-SRV003/extensions/deforum/scripts/deforum_helpers/src\midas\dpt_depth.py", line 55, in init hooks=hooks[backbone], KeyError: 'beitl16_384'

Traceback (most recent call last): File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\routes.py", line 337, in run_predict output = await app.get_blocks().process_api( File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\blocks.py", line 1018, in process_api data = self.postprocess_data(fn_index, result["prediction"], state) File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\blocks.py", line 956, in postprocess_data prediction_value = block.postprocess(prediction_value) File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\components.py", line 4036, in postprocess "name": self.make_temp_copy_if_needed(y), File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\processing_utils.py", line 379, in make_temp_copy_if_needed temp_file_path = self.get_temp_file_path(file_path) File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\processing_utils.py", line 365, in get_temp_file_path file_hash = self.hash_file(file_path) File "C:\StableDifussionServers\SD-SRV003\venv\lib\site-packages\gradio\processing_utils.py", line 334, in hash_file with open(file_path, "rb") as f: FileNotFoundError: [Errno 2] No such file or directory: "

KeyError: 'beitl16_384'

Time taken: 1.74s

Torch active/reserved: 2067/2082 MiB, Sys VRAM: 3763/24576 MiB (15.31%)

"

thygate commented 1 year ago

C:\StableDifussionServers\SD-SRV003/extensions/deforum/scripts/deforum_helpers/src\midas\dpt_depth.py

/deforum/

Also you're not running the lastest version of this extension, please update.