diff options
author | Jairo Correa <jn.j41r0@gmail.com> | 2022-10-04 22:53:52 +0000 |
---|---|---|
committer | Jairo Correa <jn.j41r0@gmail.com> | 2022-10-04 22:53:52 +0000 |
commit | 1f50971fb8c83c255c2819dd0b3f29a46b74f7d9 (patch) | |
tree | fd57f40a1ffa2b28105ec0bb3f7f3ab4a742681a /modules/textual_inversion/preprocess.py | |
parent | ad0cc85d1f0bd52877963f296eb1257a0c2b012b (diff) | |
parent | ef40e4cd4d383a3405e03f1da3f5b5a1820a8f53 (diff) | |
download | stable-diffusion-webui-gfx803-1f50971fb8c83c255c2819dd0b3f29a46b74f7d9.tar.gz stable-diffusion-webui-gfx803-1f50971fb8c83c255c2819dd0b3f29a46b74f7d9.tar.bz2 stable-diffusion-webui-gfx803-1f50971fb8c83c255c2819dd0b3f29a46b74f7d9.zip |
Merge branch 'master' into fix-vram
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
|