mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Handle unloading LoRA from dropdown menu icon
This commit is contained in:
parent
b6e38e8b97
commit
3dc61284d5
@ -18,11 +18,11 @@ def add_lora_to_model(lora_name):
|
|||||||
|
|
||||||
# If a LoRA had been previously loaded, or if we want
|
# If a LoRA had been previously loaded, or if we want
|
||||||
# to unload a LoRA, reload the model
|
# 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()
|
reload_model()
|
||||||
shared.lora_name = lora_name
|
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...")
|
print(f"Adding the LoRA {lora_name} to the model...")
|
||||||
params = {}
|
params = {}
|
||||||
if not shared.args.cpu:
|
if not shared.args.cpu:
|
||||||
|
Loading…
Reference in New Issue
Block a user