diff --git a/html/locale_en.json b/html/locale_en.json index e26871b17..692a82929 100644 --- a/html/locale_en.json +++ b/html/locale_en.json @@ -431,7 +431,7 @@ {"id":"","label":"Create text file next to every image with generation parameters","localized":"","hint":""}, {"id":"","label":"Create JSON log file for each saved image","localized":"","hint":"Save image information to a JSON file"}, {"id":"","label":"Save copy of image before doing face restoration","localized":"","hint":""}, - {"id":"","label":"Save copy of image before applying highres fix","localized":"","hint":""}, + {"id":"","label":"Save copy of image before applying hires","localized":"","hint":""}, {"id":"","label":"Save copy of image before applying color correction","localized":"","hint":""}, {"id":"","label":"Save copy of the inpainting greyscale mask","localized":"","hint":""}, {"id":"","label":"Save copy of inpainting masked composite","localized":"","hint":""}, diff --git a/modules/images.py b/modules/images.py index 49f83669f..39d9e7246 100644 --- a/modules/images.py +++ b/modules/images.py @@ -273,7 +273,7 @@ re_nonletters = re.compile(r'[\s' + string.punctuation + ']+') re_pattern = re.compile(r"(.*?)(?:\[([^\[\]]+)\]|$)") re_pattern_arg = re.compile(r"(.*)<([^>]*)>$") max_filename_part_length = 128 -NOTHING_AND_SKIP_PREVIOUS_TEXT = object() +NOTHING = object() def sanitize_filename_part(text, replace_spaces=True): @@ -291,13 +291,13 @@ def sanitize_filename_part(text, replace_spaces=True): class FilenameGenerator: replacements = { - 'batch_number': lambda self: NOTHING_AND_SKIP_PREVIOUS_TEXT if self.p is None or self.p.batch_size == 1 else self.p.batch_index + 1, + 'batch_number': lambda self: NOTHING if self.index <= 1 else self.index, 'cfg': lambda self: self.p and self.p.cfg_scale, 'clip_skip': lambda self: self.p and self.p.clip_skip, 'date': lambda self: datetime.datetime.now().strftime('%Y-%m-%d'), 'datetime': lambda self, *args: self.datetime(*args), # accepts formats: [datetime], [datetime], [datetime