fixed broken empty directory when prompt does not start with letter, this time for real

This commit is contained in:
AUTOMATIC 2022-09-10 16:33:45 +03:00
parent b3311a50dc
commit 1b963c205f
1 changed files with 1 additions and 1 deletions

View File

@ -264,7 +264,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
if save_to_dirs and not no_prompt: if save_to_dirs and not no_prompt:
words = [x for x in re_nonletters.split(prompt or "") if len(x)>0] words = [x for x in re_nonletters.split(prompt or "") if len(x)>0]
if len(words[0]) == 0: if len(words) == 0:
words = ["empty"] words = ["empty"]
dirname = " ".join(words[0:opts.save_to_dirs_prompt_len]).strip() dirname = " ".join(words[0:opts.save_to_dirs_prompt_len]).strip()