aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAlex "mcmonkey" Goodwin <git_commits@alexgoodwin.dev>2022-11-23 06:35:44 -0800
committerAlex "mcmonkey" Goodwin <git_commits@alexgoodwin.dev>2022-11-23 06:35:44 -0800
commit6001684be3e7b023346326b9dfc771219b8fe47e (patch)
tree0a860a317b1d8795c46a8989288badc52b590e2b /modules
parent828438b4a190759807f9054932cae3a8b880ddf1 (diff)
add model_name pattern for saving
Diffstat (limited to 'modules')
-rw-r--r--modules/images.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/images.py b/modules/images.py
index 26d5b7a9..420828b0 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -305,6 +305,7 @@ class FilenameGenerator:
'styles': lambda self: self.p and sanitize_filename_part(", ".join([style for style in self.p.styles if not style == "None"]) or "None", replace_spaces=False),
'sampler': lambda self: self.p and sanitize_filename_part(self.p.sampler_name, replace_spaces=False),
'model_hash': lambda self: getattr(self.p, "sd_model_hash", shared.sd_model.sd_model_hash),
+ 'model_name': lambda self: shared.sd_model.sd_checkpoint_info.model_name,
'date': lambda self: datetime.datetime.now().strftime('%Y-%m-%d'),
'datetime': lambda self, *args: self.datetime(*args), # accepts formats: [datetime], [datetime<Format>], [datetime<Format><Time Zone>]
'job_timestamp': lambda self: getattr(self.p, "job_timestamp", shared.state.job_timestamp),