thygate / stable-diffusion-webui-depthmap-script

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

ERROR: argument of type 'NoneType' is not iterable #394

Open xeimaran opened 8 months ago

xeimaran commented 8 months ago

I get this error while running Midas_v21 in depth tab: Anyone knows how to fix this?

Traceback (most recent call last): File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\src\common_ui.py", line 526, in run_generate input_i, type, result = next(gen_obj) File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\src\core.py", line 322, in core_generation_funnel raise e File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\src\core.py", line 124, in core_generation_funnel model_holder.ensure_models(inp[go.MODEL_TYPE], device, inp[go.BOOST]) File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\src\depthmap_generation.py", line 67, in ensure_models self.load_models(model_type, device, boost) File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\src\depthmap_generation.py", line 162, in load_models model = MidasNet(model_path, non_negative=True) File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\dmidas\midas_net.py", line 47, in init self.load(path) File "D:\Work\YouTube\AI\stable-diffusion-webui-master\extensions\stable-diffusion-webui-depthmap-script\dmidas\base_model.py", line 13, in load if "optimizer" in parameters: TypeError: argument of type 'NoneType' is not iterable

Time taken: 1.8 sec.

newbeeooorz commented 6 months ago

Error: File "D:+StableDiffusion\sd-webui-aki\extensions\sd-webui-controlnet\annotator\midas\midas\base_model.py", line 13, in load if "optimizer" in parameters: TypeError: argument of type 'NoneType' is not iterable Solve: delete this file & App will auto download it again. Downloading: "https://huggingface.co/lllyasviel/ControlNet/resolve/main/annotator/ckpts/dpt_hybrid-midas-501f0c75.pt" to "D:\+StableDiffusion\sd-webui-aki\extensions\sd-webui-controlnet\annotator\downloads\midas\dpt_hybrid-midas-501f0c75.pt"

tufeixp commented 4 weeks ago

@newbeeooorz Hi, I have meet similar problem and I tried to download this dpt file to suggest path, not work. Here's my log: Traceback (most recent call last): File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\src\common_ui.py", line 550, in run_generate input_i, type, result = next(gen_obj) File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\src\core.py", line 329, in core_generation_funnel raise e File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\src\core.py", line 130, in core_generation_funnel model_holder.ensure_models(inp[go.MODEL_TYPE], device, inp[go.BOOST], inp[go.TILING_MODE]) File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\src\depthmap_generation.py", line 73, in ensure_models self.load_models(model_type, device, boost, tiling_mode) File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\src\depthmap_generation.py", line 187, in load_models model = MidasNet_small(model_path, features=64, backbone="efficientnet_lite3", exportable=True, File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\dmidas\midas_net_custom.py", line 49, in init self.pretrained, self.scratch = _make_encoder(self.backbone, features, use_pretrained, groups=self.groups, expand=self.expand, exportable=exportable) File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\dmidas\blocks.py", line 127, in _make_encoder pretrained = _make_pretrained_efficientnet_lite3(use_pretrained, exportable=exportable) File "E:\StableDiffusion\extensions\stable-diffusion-webui-depthmap-script\dmidas\blocks.py", line 170, in _make_pretrained_efficientnet_lite3 efficientnet = torch.hub.load( File "E:\StableDiffusion\py310\lib\site-packages\torch\hub.py", line 555, in load repo_or_dir = _get_cache_or_reload(repo_or_dir, force_reload, trust_repo, "load", File "E:\StableDiffusion\py310\lib\site-packages\torch\hub.py", line 199, in _get_cache_or_reload repo_owner, repo_name, ref = _parse_repo_info(github) File "E:\StableDiffusion\py310\lib\site-packages\torch\hub.py", line 142, in _parse_repo_info with urlopen(f"https://github.com/{repo_owner}/{repo_name}/tree/main/"): File "urllib\request.py", line 216, in urlopen File "urllib\request.py", line 519, in open File "urllib\request.py", line 536, in _open File "urllib\request.py", line 496, in _call_chain File "urllib\request.py", line 1391, in https_open File "urllib\request.py", line 1352, in do_open File "", line 129, in getresponse File "http\client.py", line 1374, in getresponse File "http\client.py", line 318, in begin File "http\client.py", line 287, in _read_status http.client.RemoteDisconnected: Remote end closed connection without response Time taken: 10.6 sec.

A: 1.64 GB, R: 1.94 GB, Sys: 3.1/8 GB (38.2%)