aboutsummaryrefslogtreecommitdiff
path: root/modules/modelloader.py
diff options
context:
space:
mode:
authord8ahazard <d8ahazard@gmail.com>2022-10-02 07:56:22 -0500
committerGitHub <noreply@github.com>2022-10-02 07:56:22 -0500
commit5d26ba2b4b84b64d82150ae70495f928b3b0b116 (patch)
tree71cb73ba018dab302ea1dfa8c3f368137106a6af /modules/modelloader.py
parent8deae077004f0332ca607fc3a5d568b1a4705bec (diff)
parent5f561ee95dcb09d92ea67bab5561dced93fe3d00 (diff)
Merge branch 'master' into ScuNET
Diffstat (limited to 'modules/modelloader.py')
-rw-r--r--modules/modelloader.py5
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: