diff options
author | papuSpartan <mcgpapu@gmail.com> | 2022-10-22 19:53:37 +0000 |
---|---|---|
committer | papuSpartan <mcgpapu@gmail.com> | 2022-10-22 19:53:37 +0000 |
commit | ce42879438bf2dbd76b5b346be656292e42ffb2b (patch) | |
tree | 64d5e2264a1bc1f79467bcd747d4de4e522474ed /modules | |
parent | 700340448baa7412c7cc5ff3d1349ac79ee8ed0c (diff) | |
download | stable-diffusion-webui-gfx803-ce42879438bf2dbd76b5b346be656292e42ffb2b.tar.gz stable-diffusion-webui-gfx803-ce42879438bf2dbd76b5b346be656292e42ffb2b.tar.bz2 stable-diffusion-webui-gfx803-ce42879438bf2dbd76b5b346be656292e42ffb2b.zip |
fix js func signature and not forget to initialize confirmation var to prevent exception upon cancelling confirmation
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ui.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py index 25aeba3b..e58f040e 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -429,10 +429,12 @@ def create_seed_inputs(): return seed, reuse_seed, subseed, reuse_subseed, subseed_strength, seed_resize_from_h, seed_resize_from_w, seed_checkbox
-def clear_prompt(_prompt, _prompt_neg, confirmed, _token_counter):
+def clear_prompt(prompt, _prompt_neg, confirmed, _token_counter):
"""Given confirmation from a user on the client-side, go ahead with clearing prompt"""
if confirmed:
return ["", "", confirmed, update_token_counter("", 1)]
+ else:
+ return [prompt, _prompt_neg, confirmed, _token_counter]
def connect_clear_prompt(button, prompt, prompt_neg, _dummy_confirmed, token_counter):
|