diff --git a/modules/chat.py b/modules/chat.py index 5dbb517c..a142a3c9 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -247,10 +247,12 @@ def impersonate_wrapper(text, state): if next_character_found: break - if reply is not None: + if reply in [None, '']: + break + else: cumulative_reply = reply - yield reply + yield cumulative_reply def generate_chat_reply(text, state, regenerate=False, _continue=False):