diff --git a/modules/text_generation.py b/modules/text_generation.py index a7f3509b..0f24dc58 100644 --- a/modules/text_generation.py +++ b/modules/text_generation.py @@ -353,10 +353,11 @@ def generate_reply_HF(question, original_question, seed, state, stopping_strings with generate_with_streaming(**generate_params) as generator: for output in generator: - yield get_reply_from_output_ids(output, input_ids, original_question, state, is_chat=is_chat) if output[-1] in eos_token_ids: break + yield get_reply_from_output_ids(output, input_ids, original_question, state, is_chat=is_chat) + except Exception: traceback.print_exc() finally: