mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-01-20 15:40:23 +01:00
Fix the character pfp not appearing when switching from instruct to chat modes
This commit is contained in:
parent
be3d371290
commit
66e991841a
|
|
@ -1849,6 +1849,11 @@ def handle_character_picture_change(picture):
|
|||
def handle_mode_change(state):
|
||||
history, loaded_unique_id = load_latest_history(state)
|
||||
histories = find_all_histories_with_first_prompts(state)
|
||||
|
||||
# Ensure character picture cache exists
|
||||
if state['mode'] in ['chat', 'chat-instruct'] and state['character_menu'] and state['character_menu'] != 'None':
|
||||
generate_pfp_cache(state['character_menu'])
|
||||
|
||||
html = redraw_html(history, state['name1'], state['name2'], state['mode'], state['chat_style'], state['character_menu'])
|
||||
|
||||
convert_to_markdown.cache_clear()
|
||||
|
|
|
|||
Loading…
Reference in a new issue