From 85f914b9b99d35eeb49426bb90ae65ef28cf04d4 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Sat, 25 Feb 2023 02:36:01 -0300 Subject: [PATCH] Disable the hijack after using it --- modules/chat.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/chat.py b/modules/chat.py index 04ab5dc0..0097af0c 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -96,6 +96,7 @@ def chatbot_wrapper(text, max_new_tokens, do_sample, temperature, top_p, typical custom_prompt_generator = None for extension, _ in extensions_module.iterator(): if hasattr(extension, 'input_hijack') and extension.input_hijack['state'] == True: + extension.input_hijack['state'] = False text, visible_text = extension.input_hijack['value'] if custom_prompt_generator is None and hasattr(extension, 'custom_prompt_generator'): custom_prompt_generator = extension.custom_prompt_generator