mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-02-28 19:14:54 +08:00
allow loading embeddings from subdirectories
This commit is contained in:
parent
310b71f669
commit
81133d4168
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user