mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Updating the shared settings object when loading a model (#4425)
This commit is contained in:
parent
9bd0724d85
commit
aaf726dbfb
@ -212,6 +212,9 @@ def load_model_wrapper(selected_model, loader, autoload=False):
|
|||||||
if 'instruction_template' in settings:
|
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'])
|
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
|
yield output
|
||||||
else:
|
else:
|
||||||
yield f"Failed to load `{selected_model}`."
|
yield f"Failed to load `{selected_model}`."
|
||||||
|
Loading…
Reference in New Issue
Block a user