From 7ced4e26a7d8bdbaa9ae4df9890b6c9d36506489 Mon Sep 17 00:00:00 2001 From: lllyasviel Date: Thu, 19 Oct 2023 07:17:29 -0700 Subject: [PATCH] Curse Gradio --- fooocus_version.py | 2 +- webui.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fooocus_version.py b/fooocus_version.py index a4dcdf49..0e566efb 100644 --- a/fooocus_version.py +++ b/fooocus_version.py @@ -1 +1 @@ -version = '2.1.707' +version = '2.1.708' diff --git a/webui.py b/webui.py index dbded4fd..21f7a9de 100644 --- a/webui.py +++ b/webui.py @@ -64,8 +64,12 @@ with shared.gradio_root: with gr.Row(elem_classes='type_row'): with gr.Column(scale=17): prompt = gr.Textbox(show_label=False, placeholder="Type prompt here.", - value=modules.path.default_positive_prompt, container=False, autofocus=True, elem_classes='type_row', lines=1024) + + if isinstance(modules.path.default_positive_prompt, str) \ + and modules.path.default_positive_prompt != '': + shared.gradio_root.load(lambda: modules.path.default_positive_prompt, outputs=prompt) + with gr.Column(scale=3, min_width=0): generate_button = gr.Button(label="Generate", value="Generate", elem_classes='type_row', elem_id='generate_button', visible=True) skip_button = gr.Button(label="Skip", value="Skip", elem_classes='type_row_half', visible=False)