mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 16:17:57 +01:00
Make the regex for "Save settings for this model" exact
This commit is contained in:
parent
f98fd01dcd
commit
a77965e801
@ -264,11 +264,12 @@ def save_model_settings(model, state):
|
|||||||
else:
|
else:
|
||||||
user_config = {}
|
user_config = {}
|
||||||
|
|
||||||
|
model_regex = model + '$' # For exact matches
|
||||||
if model not in user_config:
|
if model not in user_config:
|
||||||
user_config[model] = {}
|
user_config[model_regex] = {}
|
||||||
|
|
||||||
for k in ui.list_model_elements():
|
for k in ui.list_model_elements():
|
||||||
user_config[model][k] = state[k]
|
user_config[model_regex][k] = state[k]
|
||||||
|
|
||||||
with open(p, 'w') as f:
|
with open(p, 'w') as f:
|
||||||
f.write(yaml.dump(user_config))
|
f.write(yaml.dump(user_config))
|
||||||
|
Loading…
Reference in New Issue
Block a user