aboutsummaryrefslogtreecommitdiffstats
path: root/modules/shared.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-03-11 13:45:35 +0000
committerGitHub <noreply@github.com>2023-03-11 13:45:35 +0000
commitd3dd6cc01c70516b0b3406d87cd0f6a682c78b86 (patch)
treecb29d89dcf14d7cd057796bf87f4acae5b9a26e9 /modules/shared.py
parent76bc72116e2576b887e3ec8619c9c0f54a151f7a (diff)
parenta47c18297e1611568c732e6e6922d5be9def7c47 (diff)
downloadstable-diffusion-webui-gfx803-d3dd6cc01c70516b0b3406d87cd0f6a682c78b86.tar.gz
stable-diffusion-webui-gfx803-d3dd6cc01c70516b0b3406d87cd0f6a682c78b86.tar.bz2
stable-diffusion-webui-gfx803-d3dd6cc01c70516b0b3406d87cd0f6a682c78b86.zip
Merge pull request #8175 from vladmandic/image_size
adds checks for resulting image size to avoid memory issues
Diffstat (limited to 'modules/shared.py')
-rw-r--r--modules/shared.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/shared.py b/modules/shared.py
index aafe31de..4e229353 100644
--- a/modules/shared.py
+++ b/modules/shared.py
@@ -334,6 +334,7 @@ options_templates.update(options_section(('saving-images', "Saving images/grids"
"export_for_4chan": OptionInfo(True, "If the saved image file size is above the limit, or its either width or height are above the limit, save a downscaled copy as JPG"),
"img_downscale_threshold": OptionInfo(4.0, "File size limit for the above option, MB", gr.Number),
"target_side_length": OptionInfo(4000, "Width/height limit for the above option, in pixels", gr.Number),
+ "img_max_size_mp": OptionInfo(200, "Maximum image size, in megapixels", gr.Number),
"use_original_name_batch": OptionInfo(True, "Use original name for output filename during batch process in extras tab"),
"use_upscaler_name_as_suffix": OptionInfo(False, "Use upscaler name as filename suffix in the extras tab"),