diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-30 20:09:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-30 20:09:18 +0000 |
commit | f253790b40a71f2d88951c26224e0c80b6baea52 (patch) | |
tree | 786b67f0cde4c15b3a0112e02495a51978ea9d26 /modules/modelloader.py | |
parent | 3f64e23f81618395428da0a132bf3a6cfd5c42c9 (diff) | |
parent | a9a0320d2688a292fe834986c9abe141ff29bf7c (diff) | |
download | stable-diffusion-webui-gfx803-f253790b40a71f2d88951c26224e0c80b6baea52.tar.gz stable-diffusion-webui-gfx803-f253790b40a71f2d88951c26224e0c80b6baea52.tar.bz2 stable-diffusion-webui-gfx803-f253790b40a71f2d88951c26224e0c80b6baea52.zip |
Merge pull request #1371 from d8ahazard/master
Fix LDSR, BSRGAN, recursive SD checkpoint Loading
Diffstat (limited to 'modules/modelloader.py')
-rw-r--r-- | modules/modelloader.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/modelloader.py b/modules/modelloader.py index 1106aeb7..8c862b42 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -1,3 +1,4 @@ +import glob import os import shutil import importlib @@ -41,7 +42,7 @@ def load_models(model_path: str, model_url: str = None, command_path: str = None for place in places: if os.path.exists(place): - for file in os.listdir(place): + for file in glob.iglob(place + '**/**', recursive=True): full_path = os.path.join(place, file) if os.path.isdir(full_path): continue |