Unverified Commit 143ed5a4 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #6384 from faber6/loads-ti-from-subdirs

allow loading embeddings from subdirectories
parents 8a13afd2 81133d41
...@@ -149,9 +149,10 @@ class EmbeddingDatabase: ...@@ -149,9 +149,10 @@ class EmbeddingDatabase:
else: else:
self.skipped_embeddings[name] = embedding self.skipped_embeddings[name] = embedding
for fn in os.listdir(self.embeddings_dir): for root, dirs, fns in os.walk(self.embeddings_dir):
for fn in fns:
try: try:
fullfn = os.path.join(self.embeddings_dir, fn) fullfn = os.path.join(root, fn)
if os.stat(fullfn).st_size == 0: if os.stat(fullfn).st_size == 0:
continue continue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment