aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-16 09:27:28 +0300
committerGitHub <noreply@github.com>2023-07-16 09:27:28 +0300
commitf71630edb32b8de93f250767ec7a75cc9f44bc4a (patch)
tree1c00448b8e75ecca822a3a0ef46b5b7a3ff0658a /modules
parent89c3e17c65756377108f7adde20f8d7b5d1fd489 (diff)
parent5d94088eac401545286ef8b16455cc88e9797300 (diff)
Merge pull request #11794 from MarcusAdams/none-filename-token
Added [none] filename token.
Diffstat (limited to 'modules')
-rw-r--r--modules/images.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/images.py b/modules/images.py
index 4bdedb7f..fb5d2e75 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -380,6 +380,7 @@ class FilenameGenerator:
'denoising': lambda self: self.p.denoising_strength if self.p and self.p.denoising_strength else NOTHING_AND_SKIP_PREVIOUS_TEXT,
'user': lambda self: self.p.user,
'vae_filename': lambda self: self.get_vae_filename(),
+ 'none': lambda self: '', # Overrides the default so you can get just the sequence number
}
default_time_format = '%Y%m%d%H%M%S'
@@ -601,13 +602,13 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
else:
file_decoration = opts.samples_filename_pattern or "[seed]-[prompt_spaces]"
+ file_decoration = namegen.apply(file_decoration) + suffix
+
add_number = opts.save_images_add_number or file_decoration == ''
if file_decoration != "" and add_number:
file_decoration = f"-{file_decoration}"
- file_decoration = namegen.apply(file_decoration) + suffix
-
if add_number:
basecount = get_next_sequence_number(path, basename)
fullfn = None