diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-05 08:01:38 +0300 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-05 08:01:38 +0300 |
commit | ef1698fd6dbd6387341a1eeeded068ff1476ee50 (patch) | |
tree | ddaa0cf76e8cf95b93f63909a026ae3d5eab460a /modules/images.py | |
parent | 0fae47e97445df4e7de4d85538a80917fc2a2457 (diff) | |
parent | c613416af375092f55b9bc8649c949e95d250c44 (diff) |
Merge branch 'dev' into extra-networks-always-visible
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/images.py b/modules/images.py index fb5d2e75..ba3c43a4 100644 --- a/modules/images.py +++ b/modules/images.py @@ -318,7 +318,7 @@ def resize_image(resize_mode, im, width, height, upscaler_name=None): return res
-invalid_filename_chars = '<>:"/\\|?*\n'
+invalid_filename_chars = '<>:"/\\|?*\n\r\t'
invalid_filename_prefix = ' '
invalid_filename_postfix = ' .'
re_nonletters = re.compile(r'[\s' + string.punctuation + ']+')
@@ -363,7 +363,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: sanitize_filename_part(shared.sd_model.sd_checkpoint_info.model_name, replace_spaces=False),
+ 'model_name': lambda self: sanitize_filename_part(shared.sd_model.sd_checkpoint_info.name_for_extra, replace_spaces=False),
'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),
|