From 1dd5d6bafad7575f347056a29636cbab71c1c468 Mon Sep 17 00:00:00 2001 From: papuSpartan Date: Tue, 1 Nov 2022 14:33:55 -0500 Subject: [PATCH] clean py func defs --- modules/ui.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ui.py b/modules/ui.py index f43e79ab2..8a1f38872 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -401,13 +401,13 @@ def create_seed_inputs(): -def connect_clear_prompt(button, prompt, prompt_neg, _dummy_confirmed, token_counter): +def connect_clear_prompt(button): """Given clear button, prompt, and token_counter objects, setup clear prompt button click event""" button.click( _js="clear_prompt", fn=None, - inputs=[prompt, prompt_neg, _dummy_confirmed, token_counter], - outputs=[prompt, prompt_neg, _dummy_confirmed, token_counter], + inputs=[], + outputs=[], ) @@ -746,7 +746,7 @@ def create_ui(wrap_gradio_gpu_call): connect_reuse_seed(seed, reuse_seed, generation_info, dummy_component, is_subseed=False) connect_reuse_seed(subseed, reuse_subseed, generation_info, dummy_component, is_subseed=True) - connect_clear_prompt(clear_prompt_button, txt2img_prompt, txt2img_negative_prompt, dummy_component, token_counter) + connect_clear_prompt(clear_prompt_button) txt2img_args = dict( fn=wrap_gradio_gpu_call(modules.txt2img.txt2img), @@ -929,7 +929,7 @@ def create_ui(wrap_gradio_gpu_call): connect_reuse_seed(seed, reuse_seed, generation_info, dummy_component, is_subseed=False) connect_reuse_seed(subseed, reuse_subseed, generation_info, dummy_component, is_subseed=True) - connect_clear_prompt(clear_prompt_button, img2img_prompt, img2img_negative_prompt, dummy_component, token_counter) + connect_clear_prompt(clear_prompt_button) img2img_prompt_img.change( fn=modules.images.image_data,