aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw-e-w <40751091+w-e-w@users.noreply.github.com>2023-09-07 10:01:16 +0900
committerw-e-w <40751091+w-e-w@users.noreply.github.com>2023-09-07 10:01:16 +0900
commit340fce2113b6d68f06f5bb8c897be998f03b4c8c (patch)
tree65d1117bd59ea2397764907298b381bc7aaac7b2
parentd39440bfb9d3b20338fc23a78e6655b1e2f7c1d5 (diff)
enable console prompts in settings
-rw-r--r--modules/img2img.py2
-rw-r--r--modules/shared_options.py1
-rw-r--r--modules/txt2img.py2
3 files changed, 3 insertions, 2 deletions
diff --git a/modules/img2img.py b/modules/img2img.py
index c81c7ab9..cbd80bac 100644
--- a/modules/img2img.py
+++ b/modules/img2img.py
@@ -199,7 +199,7 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s
p.user = request.username
- if shared.cmd_opts.enable_console_prompts:
+ if shared.opts.enable_console_prompts or shared.cmd_opts.enable_console_prompts:
print(f"\nimg2img: {prompt}", file=shared.progress_print_out)
if mask:
diff --git a/modules/shared_options.py b/modules/shared_options.py
index 00b273fa..44fb1670 100644
--- a/modules/shared_options.py
+++ b/modules/shared_options.py
@@ -100,6 +100,7 @@ options_templates.update(options_section(('face-restoration', "Face restoration"
options_templates.update(options_section(('system', "System"), {
"auto_launch_browser": OptionInfo("Local", "Automatically open webui in browser on startup", gr.Radio, lambda: {"choices": ["Disable", "Local", "Remote"]}),
+ "enable_console_prompts": OptionInfo(False, "Print prompts to console when generating with txt2img and img2img."),
"show_warnings": OptionInfo(False, "Show warnings in console.").needs_reload_ui(),
"show_gradio_deprecation_warnings": OptionInfo(True, "Show gradio deprecation warnings in console.").needs_reload_ui(),
"memmon_poll_rate": OptionInfo(8, "VRAM usage polls per second during generation.", gr.Slider, {"minimum": 0, "maximum": 40, "step": 1}).info("0 = disable"),
diff --git a/modules/txt2img.py b/modules/txt2img.py
index 1ee592ad..379ef859 100644
--- a/modules/txt2img.py
+++ b/modules/txt2img.py
@@ -45,7 +45,7 @@ def txt2img(id_task: str, prompt: str, negative_prompt: str, prompt_styles, step
p.user = request.username
- if cmd_opts.enable_console_prompts:
+ if shared.opts.enable_console_prompts or cmd_opts.enable_console_prompts:
print(f"\ntxt2img: {prompt}", file=shared.progress_print_out)
with closing(p):