aboutsummaryrefslogtreecommitdiff
path: root/modules/modelloader.py
diff options
context:
space:
mode:
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: