diff options
author | d8ahazard <d8ahazard@gmail.com> | 2022-10-02 12:56:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-02 12:56:22 +0000 |
commit | 5d26ba2b4b84b64d82150ae70495f928b3b0b116 (patch) | |
tree | 71cb73ba018dab302ea1dfa8c3f368137106a6af /modules/modelloader.py | |
parent | 8deae077004f0332ca607fc3a5d568b1a4705bec (diff) | |
parent | 5f561ee95dcb09d92ea67bab5561dced93fe3d00 (diff) | |
download | stable-diffusion-webui-gfx803-5d26ba2b4b84b64d82150ae70495f928b3b0b116.tar.gz stable-diffusion-webui-gfx803-5d26ba2b4b84b64d82150ae70495f928b3b0b116.tar.bz2 stable-diffusion-webui-gfx803-5d26ba2b4b84b64d82150ae70495f928b3b0b116.zip |
Merge branch 'master' into ScuNET
Diffstat (limited to 'modules/modelloader.py')
-rw-r--r-- | modules/modelloader.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/modelloader.py b/modules/modelloader.py index b1721671..b0f2f33d 100644 --- a/modules/modelloader.py +++ b/modules/modelloader.py @@ -1,3 +1,4 @@ +import glob import os import shutil import importlib @@ -40,8 +41,8 @@ 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): - full_path = os.path.join(place, file) + for file in glob.iglob(place + '**/**', recursive=True): + full_path = file if os.path.isdir(full_path): continue if len(ext_filter) != 0: |