diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-10-04 14:23:48 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-10-04 14:23:48 +0000 |
commit | 957e29a8e9cb8ca069799ec69263e188c89ed6a6 (patch) | |
tree | 75223802583c2085d2b57fd028a90bec4ed2adde | |
parent | 52cef36f6ba169a8e606ecdcaed73d47378f0e8e (diff) | |
download | stable-diffusion-webui-gfx803-957e29a8e9cb8ca069799ec69263e188c89ed6a6.tar.gz stable-diffusion-webui-gfx803-957e29a8e9cb8ca069799ec69263e188c89ed6a6.tar.bz2 stable-diffusion-webui-gfx803-957e29a8e9cb8ca069799ec69263e188c89ed6a6.zip |
option to not show images in web ui
-rw-r--r-- | modules/img2img.py | 3 | ||||
-rw-r--r-- | modules/shared.py | 1 | ||||
-rw-r--r-- | modules/txt2img.py | 3 |
3 files changed, 7 insertions, 0 deletions
diff --git a/modules/img2img.py b/modules/img2img.py index 2ff8e261..da212d72 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -129,4 +129,7 @@ def img2img(mode: int, prompt: str, negative_prompt: str, prompt_style: str, pro if opts.samples_log_stdout:
print(generation_info_js)
+ if opts.do_not_show_images:
+ processed.images = []
+
return processed.images, generation_info_js, plaintext_to_html(processed.info)
diff --git a/modules/shared.py b/modules/shared.py index a7d13b2d..ff4e5fa3 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -229,6 +229,7 @@ options_templates.update(options_section(('ui', "User interface"), { "show_progressbar": OptionInfo(True, "Show progressbar"),
"show_progress_every_n_steps": OptionInfo(0, "Show show image creation progress every N sampling steps. Set 0 to disable.", gr.Slider, {"minimum": 0, "maximum": 32, "step": 1}),
"return_grid": OptionInfo(True, "Show grid in results for web"),
+ "do_not_show_images": OptionInfo(False, "Do not show any images in results for web"),
"add_model_hash_to_info": OptionInfo(True, "Add model hash to generation information"),
"font": OptionInfo("", "Font for image grids that have text"),
"js_modal_lightbox": OptionInfo(True, "Enable full page image viewer"),
diff --git a/modules/txt2img.py b/modules/txt2img.py index d4406c3c..e985242b 100644 --- a/modules/txt2img.py +++ b/modules/txt2img.py @@ -48,5 +48,8 @@ def txt2img(prompt: str, negative_prompt: str, prompt_style: str, prompt_style2: if opts.samples_log_stdout:
print(generation_info_js)
+ if opts.do_not_show_images:
+ processed.images = []
+
return processed.images, generation_info_js, plaintext_to_html(processed.info)
|