From 3dc61284d581bdf688731cb68f1dc3fa47ae59d1 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 27 Mar 2023 00:04:43 -0300 Subject: [PATCH] Handle unloading LoRA from dropdown menu icon --- modules/LoRA.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/LoRA.py b/modules/LoRA.py index 283fcf4c..f5dfe4ed 100644 --- a/modules/LoRA.py +++ b/modules/LoRA.py @@ -18,11 +18,11 @@ def add_lora_to_model(lora_name): # If a LoRA had been previously loaded, or if we want # to unload a LoRA, reload the model - if shared.lora_name != "None" or lora_name == "None": + if shared.lora_name not in ['None', ''] or lora_name in ['None', '']: reload_model() shared.lora_name = lora_name - if lora_name != "None": + if lora_name not in ['None', '']: print(f"Adding the LoRA {lora_name} to the model...") params = {} if not shared.args.cpu: