diff options
author | brkirch <brkirch@users.noreply.github.com> | 2022-10-04 08:25:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-04 08:25:27 +0000 |
commit | 35a00b013007c16c97ed79bee4cefcb798181dea (patch) | |
tree | fd3bf9f74b3b549d20836116eea759c5b06f48b8 /modules/textual_inversion/preprocess.py | |
parent | b88e4ea7d6536ddc814a9101a258f87b06230019 (diff) | |
parent | 556c36b9607e3f4eacdddc85f8e7a78b29476ea7 (diff) | |
download | stable-diffusion-webui-gfx803-35a00b013007c16c97ed79bee4cefcb798181dea.tar.gz stable-diffusion-webui-gfx803-35a00b013007c16c97ed79bee4cefcb798181dea.tar.bz2 stable-diffusion-webui-gfx803-35a00b013007c16c97ed79bee4cefcb798181dea.zip |
Merge branch 'AUTOMATIC1111:master' into cpu-cmdline-opt
Diffstat (limited to 'modules/textual_inversion/preprocess.py')
-rw-r--r-- | modules/textual_inversion/preprocess.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/textual_inversion/preprocess.py b/modules/textual_inversion/preprocess.py index 209e928f..f545a993 100644 --- a/modules/textual_inversion/preprocess.py +++ b/modules/textual_inversion/preprocess.py @@ -26,7 +26,9 @@ def preprocess(process_src, process_dst, process_flip, process_split, process_ca if process_caption:
caption = "-" + shared.interrogator.generate_caption(image)
else:
- caption = ""
+ caption = filename
+ caption = os.path.splitext(caption)[0]
+ caption = os.path.basename(caption)
image.save(os.path.join(dst, f"{index:05}-{subindex[0]}{caption}.png"))
subindex[0] += 1
|