Browse Source

add embeddings dir

AUTOMATIC 2 years ago
parent
commit
98cc6c6e74
2 changed files with 6 additions and 1 deletions
  1. 0 0
      embeddings/Place Textual Inversion embeddings here.txt
  2. 6 1
      modules/sd_hijack.py

+ 0 - 0
embeddings/Place Textual Inversion embeddings here.txt


+ 6 - 1
modules/sd_hijack.py

@@ -232,7 +232,12 @@ class StableDiffusionModelHijack:
 
         for fn in os.listdir(dirname):
             try:
-                process_file(os.path.join(dirname, fn), fn)
+                fullfn = os.path.join(dirname, fn)
+
+                if os.stat(fullfn).st_size == 0:
+                    continue
+
+                process_file(fullfn, fn)
             except Exception:
                 print(f"Error loading emedding {fn}:", file=sys.stderr)
                 print(traceback.format_exc(), file=sys.stderr)