diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 17:47:46 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 17:47:46 +0000 |
commit | 3de44fc580681f785065565fbe63f46c5a872d43 (patch) | |
tree | a986f34beb19cd399c076df98b287e2e526227a4 /modules/shared.py | |
parent | 35a4649c9e0a54272bbaae7b2489d529bf3154d1 (diff) | |
download | stable-diffusion-webui-gfx803-3de44fc580681f785065565fbe63f46c5a872d43.tar.gz stable-diffusion-webui-gfx803-3de44fc580681f785065565fbe63f46c5a872d43.tar.bz2 stable-diffusion-webui-gfx803-3de44fc580681f785065565fbe63f46c5a872d43.zip |
Include the model name (or the SHA256 of the file) in the metadata #271
Diffstat (limited to 'modules/shared.py')
-rw-r--r-- | modules/shared.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/shared.py b/modules/shared.py index ea1c879b..8e07c9b1 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -97,7 +97,7 @@ class Options: data = None
hide_dirs = {"visible": False} if cmd_opts.hide_ui_dir_config else None
data_labels = {
- "samples_filename_format": OptionInfo("", "Samples filename format using following tags: [steps],[cfg],[prompt],[prompt_spaces],[width],[height],[sampler],[seed]. Leave blank for default."),
+ "samples_filename_format": OptionInfo("", "Samples filename format using following tags: [steps], [cfg], [prompt], [prompt_spaces], [width], [height], [sampler], [seed], [model_hash]. Leave blank for default."),
"outdir_samples": OptionInfo("", "Output directory for images; if empty, defaults to two directories below", component_args=hide_dirs),
"outdir_txt2img_samples": OptionInfo("outputs/txt2img-images", 'Output directory for txt2img images', component_args=hide_dirs),
"outdir_img2img_samples": OptionInfo("outputs/img2img-images", 'Output directory for img2img images', component_args=hide_dirs),
@@ -120,6 +120,7 @@ class Options: "jpeg_quality": OptionInfo(80, "Quality for saved jpeg images", gr.Slider, {"minimum": 1, "maximum": 100, "step": 1}),
"export_for_4chan": OptionInfo(True, "If PNG image is larger than 4MB or any dimension is larger than 4000, downscale and save copy as JPG"),
"enable_pnginfo": OptionInfo(True, "Save text information about generation parameters as chunks to png files"),
+ "add_model_hash_to_info": OptionInfo(False, "Add model hash to generation information"),
"font": OptionInfo("", "Font for image grids that have text"),
"enable_emphasis": OptionInfo(True, "Use (text) to make model pay more attention to text text and [text] to make it pay less attention"),
"save_txt": OptionInfo(False, "Create a text file next to every image with generation parameters."),
@@ -178,6 +179,7 @@ if os.path.exists(config_filename): sd_upscalers = []
sd_model = None
+sd_model_hash = ''
progress_print_out = sys.stdout
|