aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-30 11:16:26 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-30 11:16:26 +0000
commit98cc6c6e744f454cbbd763033c93a0dceb40c343 (patch)
treefb2b4e2a18ebf637daf989fcb28829d206d8c4a8
parentb197f398ec6fdd4b62f41a70a8ce11d972738e7f (diff)
downloadstable-diffusion-webui-gfx803-98cc6c6e744f454cbbd763033c93a0dceb40c343.tar.gz
stable-diffusion-webui-gfx803-98cc6c6e744f454cbbd763033c93a0dceb40c343.tar.bz2
stable-diffusion-webui-gfx803-98cc6c6e744f454cbbd763033c93a0dceb40c343.zip
add embeddings dir
-rw-r--r--embeddings/Place Textual Inversion embeddings here.txt0
-rw-r--r--modules/sd_hijack.py7
2 files changed, 6 insertions, 1 deletions
diff --git a/embeddings/Place Textual Inversion embeddings here.txt b/embeddings/Place Textual Inversion embeddings here.txt
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/embeddings/Place Textual Inversion embeddings here.txt
diff --git a/modules/sd_hijack.py b/modules/sd_hijack.py
index 5945b7c2..fa7eaeb8 100644
--- a/modules/sd_hijack.py
+++ b/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)