From aaf726dbfbcd92c139f4776990ab2fd132653297 Mon Sep 17 00:00:00 2001 From: Mehran Ziadloo Date: Tue, 31 Oct 2023 21:29:57 -0700 Subject: [PATCH] Updating the shared settings object when loading a model (#4425) --- modules/ui_model_menu.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index 8208b63a..b9a8cbe7 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -212,6 +212,9 @@ def load_model_wrapper(selected_model, loader, autoload=False): if 'instruction_template' in settings: output += '\n\nIt seems to be an instruction-following model with template "{}". In the chat tab, instruct or chat-instruct modes should be used.'.format(settings['instruction_template']) + # Applying the changes to the global shared settings (in-memory) + shared.settings.update({k: v for k, v in settings.items() if k in shared.settings}) + yield output else: yield f"Failed to load `{selected_model}`."