text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

In-progress chat session resets / disappears when returning to chat after a time away

Open MovingSymbols opened this issue 1 year ago • 10 comments

Describe the bug

I have seen chat sessions completely disappear after hitting CTRL-ENTER to regenerate a response, (or SHIFT-CTRL-BKSP to remove last response) and seen the in-progress chat session disappear / reset as a result.

The chat "title" in the dropdown is still there but the chat contents have disappeared entirely, with the newest response (in the case of regenerating) now being the only thing in that chat, or nothing at all in the case of removing the last reponse (Ctrl-Shift-Bksp). All previous chat content is gone.

I have a habit of starting a chat then leaving it for a while and coming back to it later (at least one hour, sometimes much more) to continue and I've triggered it multiple times so far.

There is no error in the terminal output.

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

This is the simplest process so far that resulted in the problem.

  1. Load a model and a character and start a chat.
  2. Unload the model.
  3. Wait some time (never less than an hour, usually more)
  4. Load the model.
  5. Return to the in-progress chat tab (which currently and correctly displays the in-progress chat) to resume chatting.
  6. Submit a new reply, hit CTRL-ENTER to regenerate the last response, or hit Ctrl-Shift-Bksp to remove last. (It seems any kind of interaction does it, but those are the ones I have tried and triggered the bug with.)
  7. All previous chat history disappears. (All earlier responses are now gone.) If the model makes a new reply, it appears at the top like a brand new chat. The history is gone.
  8. The name of the chat ID in the UI (in the PAST CHATS dropdown) is unchanged. Confirm the JSON file in logs\chat<character name><chat ID> contains only the latest response, and all previous dialogue with the character is gone.

Note added: Running in verbose mode confirms the history is gone, the model's (new) response isn't using the full context. So this erasure happens prior to the model getting the request, it seems.

Screenshot

Screenshot 2024-06-02 162652

A populated chat turned into this after combing back two hours or so later, and sending a Ctrl-Shift-Backspace to remove last reply.

Logs

There is no error in the terminal output.

System Info

Windows 11 64-bit, Intel i7-12700F, Nvidia GeForce RTX 3060 12GB

MovingSymbols avatar Jun 02 '24 22:06 MovingSymbols

Replicated on MacOS Sonoma 14.5 in Safari. Same issue, chat content randomly disappears, most often when starting to type, and then reappears upon mouseover. Probably something in the webui frontend being redrawn incorrectly.

bunnyfu avatar Jun 07 '24 19:06 bunnyfu

MovingSymbols and bunnfu are talking about two different experiences (though for all I know the same bug).

  1. As @bunnyfu notes, randomly while chatting, the text of the conversation will vanish (though all the other UI elements stay). If you mouseover it, they return. I've replicated this on MacOS Sonoma on Firefox and Safari. This is annoying, but not critical.
  2. Separately, as @MovingSymbols notes, if you leave a chat open for a long time, the chat WILL BE ERASED. It's gone from the screen, and it is also gone from the logs. If you reload the same chat, it's completely blank.

If it's at all helpful, /u/Cool-Hornet4434 on Reddit posits that this happens at midnight:

https://www.reddit.com/r/Oobabooga/comments/1dfuvx4/comment/l8lvya2/

I have not strictly verified this, but I did go to bed about 10:15 PM Thursday and when I logged in about 8:30 AM on Friday, this had happened. So if you're suffering from this, a workaround might be to close your browser (and perhaps halt Ooba?) immediately prior to the Witching Hour.

tqman avatar Jun 14 '24 17:06 tqman

I suspected midnight as well at first, but I've experienced it without midnight rolling over. I wish I could think of a way to gather more info on this. I never see any kind of error message, the existing chat just erases / starts anew from scratch (and content is also gone from the logs.) I edited the original report to refine it a bit more.

I did notice that running in verbose mode confirms the history is gone, the model's (new) response isn't using the full context -- this can be visually confirmed by looking at the console output. So the erasure seems to happen prior to the model getting the request, it seems.

MovingSymbols avatar Jun 15 '24 02:06 MovingSymbols

I've also encountered this issue, and I've found a temporary workaround. When you've been away for a while, first select an older chat log in the chat logs. After waiting for the webui to load, switch back to the latest chat log, and the new chat log will not disappear.

s567901 avatar Jun 15 '24 13:06 s567901

I just had this happen, typically the first thing I do is use "Remove last reply" when I get back to the chat interface (model is still loaded and such, but AFK for more than 6 hours I think), which empties the entire contents of that chat every time, no matter how long it was. I have the AutoSave extension installed, so I can at least recover the prompts I liked from that.

I'm pretty sure I have gone AFK after midnight localtime and come back to this happening later in the day, but I'll make a note of it next time it occurs.

ZedOud avatar Jun 16 '24 00:06 ZedOud

Few months ago I reported this bug, but it was closed after two months of inactivity: https://github.com/oobabooga/text-generation-webui/issues/5837 - the other way it gets triggered, is if the text-generation-webui crashes or restarted but the web page is not manually refreshed, then sending a message wipes the whole dialog.

So the fastest way to trigger the bug, is to stop with Ctrl+C the text-generation-webui, start it again, then (without refreshing the page) load a model and try to reply in an existing chat dialog. Instead of adding to existing chat log, it will overwrite, with whole prior history being lost.

Lissanro avatar Jun 16 '24 23:06 Lissanro

Really frustrating bug. It happens to me even if the UI is in an inactive tab for a rather short while (like 20 minutes). The only workaround I found is to refresh the page and select the character card again before entering a prompt. But I sometimes forget that and then the whole chat is lost forever.

EDIT:

[...] select an older chat log in the chat logs. After waiting for the webui to load, switch back to the latest chat log, and the new chat log will not disappear.

I can confirm that this works as well

finefin avatar Jun 23 '24 08:06 finefin

For anyone else encountering the issue that @bunnyfu is (as @tqman also describes), I think the correct git issue for discussing that is #6024

Patronics avatar Jul 04 '24 06:07 Patronics

For anyone else encountering the issue that @bunnyfu is (as @tqman also describes), I think the correct git issue for discussing that is #6024

I saw that one when I first reported this, it does not seem to be the same issue. (fwiw I have never noticed the flickering issue mentioned in #6024 )

In this issue, the chat "disappears" in the sense that it is removed / erased / lost. (Not disappears in the "flickering" sense mentioned in #6024 ) The chat is also gone from the log in the process. There is no getting it back in any way I can determine.

The workaround mentioned earlier is I think the best way to deal with this issue so far.

MovingSymbols avatar Jul 04 '24 07:07 MovingSymbols

For anyone else encountering the issue that @bunnyfu is (as @tqman also describes), I think the correct git issue for discussing that is #6024

I saw that one when I first reported this, it does not seem to be the same issue. (fwiw I have never noticed the flickering issue mentioned in #6024 )

In this issue, the chat "disappears" in the sense that it is removed / erased / lost. (Not disappears in the "flickering" sense mentioned in #6024 ) The chat is also gone from the log in the process. There is no getting it back in any way I can determine.

The workaround mentioned earlier is I think the best way to deal with this issue so far.

Yes, you are correct. I was referring to a flickering issue, which is not related to chats completely disappearing and being erased. So there seem to be two different bugs.

bunnyfu avatar Jul 04 '24 08:07 bunnyfu

I think this issue may have been fixed in a recent build. I haven't run into it lately since a recent update.

MovingSymbols avatar Jul 17 '24 06:07 MovingSymbols

Haven't noticed this happening any more, seems to be fixed.

MovingSymbols avatar Jul 25 '24 17:07 MovingSymbols