aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-02-05 08:24:32 +0000
committerGitHub <noreply@github.com>2023-02-05 08:24:32 +0000
commit475095f50a6ba3215fd221045365e5bd21b2b7d9 (patch)
treea6c70e56e9f90ce0bb4eaa43949405620bf24d9c /modules
parent668d7e9b9aba1770beae48a8664e0351fcd59f31 (diff)
parent6524478850ba1b285fee2593b113dfb726b0bd9f (diff)
downloadstable-diffusion-webui-gfx803-475095f50a6ba3215fd221045365e5bd21b2b7d9.tar.gz
stable-diffusion-webui-gfx803-475095f50a6ba3215fd221045365e5bd21b2b7d9.tar.bz2
stable-diffusion-webui-gfx803-475095f50a6ba3215fd221045365e5bd21b2b7d9.zip
Merge pull request #7528 from spezialspezial/patch-1
Catch broken model symlinks early | Quickfix modelloader.py
Diffstat (limited to 'modules')
-rw-r--r--modules/modelloader.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/modelloader.py b/modules/modelloader.py
index e9aa514e..fc3f6249 100644
--- a/modules/modelloader.py
+++ b/modules/modelloader.py
@@ -45,6 +45,9 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None
full_path = file
if os.path.isdir(full_path):
continue
+ if os.path.islink(full_path) and not os.path.exists(full_path):
+ print(f"Skipping broken symlink: {full_path}")
+ continue
if ext_blacklist is not None and any([full_path.endswith(x) for x in ext_blacklist]):
continue
if len(ext_filter) != 0: