From f83fdb9270145b29350a9c881a67c0087c3f251c Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:50:25 -0700 Subject: [PATCH] Don't reset LoRA menu when loading a model --- server.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/server.py b/server.py index 727e589..a1eb786 100644 --- a/server.py +++ b/server.py @@ -277,20 +277,17 @@ def create_model_menus(): load.click( ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then( update_model_parameters, gradio('interface_state'), None).then( - partial(load_model_wrapper, autoload=True), gradio('model_menu', 'loader'), gradio('model_status'), show_progress=False).then( - lambda: shared.lora_names, None, gradio('lora_menu')) + partial(load_model_wrapper, autoload=True), gradio('model_menu', 'loader'), gradio('model_status'), show_progress=False) unload.click( unload_model, None, None).then( - lambda: "Model unloaded", None, gradio('model_status')).then( - lambda: shared.lora_names, None, gradio('lora_menu')) + lambda: "Model unloaded", None, gradio('model_status')) reload.click( unload_model, None, None).then( ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then( update_model_parameters, gradio('interface_state'), None).then( - partial(load_model_wrapper, autoload=True), gradio('model_menu', 'loader'), gradio('model_status'), show_progress=False).then( - lambda: shared.lora_names, None, gradio('lora_menu')) + partial(load_model_wrapper, autoload=True), gradio('model_menu', 'loader'), gradio('model_status'), show_progress=False) save_settings.click( ui.gather_interface_values, gradio(shared.input_elements), gradio('interface_state')).then(