aboutsummaryrefslogtreecommitdiffstats
path: root/modules/images.py
diff options
context:
space:
mode:
authorWDevelopsWebApps <97454358+WDevelopsWebApps@users.noreply.github.com>2022-09-28 08:53:40 +0000
committerWDevelopsWebApps <97454358+WDevelopsWebApps@users.noreply.github.com>2022-09-28 08:53:40 +0000
commit03ee67bfd34b9e872b33eb05fef5db83410b16f3 (patch)
tree0ac741a8ba58dc59ed904d8a6110adfdc4d7e972 /modules/images.py
parent2ab64ec81a270c516816b5035860361ee145b9db (diff)
downloadstable-diffusion-webui-gfx803-03ee67bfd34b9e872b33eb05fef5db83410b16f3.tar.gz
stable-diffusion-webui-gfx803-03ee67bfd34b9e872b33eb05fef5db83410b16f3.tar.bz2
stable-diffusion-webui-gfx803-03ee67bfd34b9e872b33eb05fef5db83410b16f3.zip
add advanced saving for save button
Diffstat (limited to 'modules/images.py')
-rw-r--r--modules/images.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py
index 9458bf8d..923f81df 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -290,7 +290,10 @@ def apply_filename_pattern(x, p, seed, prompt):
x = x.replace("[cfg]", str(p.cfg_scale))
x = x.replace("[width]", str(p.width))
x = x.replace("[height]", str(p.height))
- x = x.replace("[styles]", sanitize_filename_part(", ".join(p.styles), replace_spaces=False))
+ #currently disabled if using the save button, will work otherwise
+ # if enabled it will cause a bug because styles is not included in the save_files data dictionary
+ if hasattr(p, "styles"):
+ x = x.replace("[styles]", sanitize_filename_part(", ".join(p.styles), replace_spaces=False))
x = x.replace("[sampler]", sanitize_filename_part(sd_samplers.samplers[p.sampler_index].name, replace_spaces=False))
x = x.replace("[model_hash]", shared.sd_model.sd_model_hash)