From ae32b8a53fd52cb4be195c4b4c329dd81a63ada7 Mon Sep 17 00:00:00 2001 From: Prof-Cheese Date: Fri, 23 Sep 2022 01:47:43 +0900 Subject: Fixed directory name generation process. 'Max prompt words' has been added to config and modified to be used in the directory name generation process. --- modules/images.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/images.py') 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)) -- cgit v1.2.3