aboutsummaryrefslogtreecommitdiffstats
path: root/modules/images.py
diff options
context:
space:
mode:
authorProf-Cheese <t.t.tomato16@gmail.com>2022-09-22 16:47:43 +0000
committerAUTOMATIC1111 <16777216c@gmail.com>2022-09-22 17:15:37 +0000
commitae32b8a53fd52cb4be195c4b4c329dd81a63ada7 (patch)
tree77ebf64e1e79b410b57222db1aa907a8b81b40e7 /modules/images.py
parentcae09e1651e7969e815b4d3443debaf606c8d4bb (diff)
downloadstable-diffusion-webui-gfx803-ae32b8a53fd52cb4be195c4b4c329dd81a63ada7.tar.gz
stable-diffusion-webui-gfx803-ae32b8a53fd52cb4be195c4b4c329dd81a63ada7.tar.bz2
stable-diffusion-webui-gfx803-ae32b8a53fd52cb4be195c4b4c329dd81a63ada7.zip
Fixed directory name generation process.
'Max prompt words' has been added to config and modified to be used in the directory name generation process.
Diffstat (limited to 'modules/images.py')
-rw-r--r--modules/images.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py
index d1707263..4926d800 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -249,7 +249,6 @@ invalid_filename_prefix = ' '
invalid_filename_postfix = ' .'
re_nonletters = re.compile(r'[\s'+string.punctuation+']+')
max_filename_part_length = 128
-max_prompt_words = 8
def sanitize_filename_part(text, replace_spaces=True):
@@ -263,6 +262,8 @@ def sanitize_filename_part(text, replace_spaces=True):
def apply_filename_pattern(x, p, seed, prompt):
+ max_prompt_words = opts.directories_max_prompt_words
+
if seed is not None:
x = x.replace("[seed]", str(seed))