uniform listdir and use threadpool to index loras

This commit is contained in:
Vladimir Mandic
2024-01-06 15:15:23 -05:00
parent dd7e3e93c4
commit de80b74c64
20 changed files with 64 additions and 114 deletions
+1 -1
View File
@@ -284,7 +284,7 @@ class Hypernetwork:
def list_hypernetworks(path):
res = {}
def list_folder(folder):
for filename in os.listdir(folder):
for filename in shared.listdir(folder):
fn = os.path.join(folder, filename)
if os.path.isfile(fn) and fn.lower().endswith(".pt"):
name = os.path.splitext(os.path.basename(fn))[0]