mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
parent
3e3a7c4250
commit
70c637bf90
@ -233,14 +233,16 @@ def save_settings(state, preset, extensions_list, show_controls, theme_state):
|
|||||||
|
|
||||||
# Save extension values in the UI
|
# Save extension values in the UI
|
||||||
for extension_name in extensions_list:
|
for extension_name in extensions_list:
|
||||||
extension = getattr(extensions, extension_name).script
|
extension = getattr(extensions, extension_name, None)
|
||||||
if hasattr(extension, 'params'):
|
if extension:
|
||||||
params = getattr(extension, 'params')
|
extension = extension.script
|
||||||
for param in params:
|
if hasattr(extension, 'params'):
|
||||||
_id = f"{extension_name}-{param}"
|
params = getattr(extension, 'params')
|
||||||
# Only save if different from default value
|
for param in params:
|
||||||
if param not in shared.default_settings or params[param] != shared.default_settings[param]:
|
_id = f"{extension_name}-{param}"
|
||||||
output[_id] = params[param]
|
# Only save if different from default value
|
||||||
|
if param not in shared.default_settings or params[param] != shared.default_settings[param]:
|
||||||
|
output[_id] = params[param]
|
||||||
|
|
||||||
# Do not save unchanged settings
|
# Do not save unchanged settings
|
||||||
for key in list(output.keys()):
|
for key in list(output.keys()):
|
||||||
|
Loading…
Reference in New Issue
Block a user