From 76c212d32264c8df5a618ae6fbb03e496144e24f Mon Sep 17 00:00:00 2001 From: FartyPants Date: Sat, 10 Jun 2023 23:41:45 -0400 Subject: [PATCH] Avoid using 'default' as adapter_name in LORA --- modules/LoRA.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/LoRA.py b/modules/LoRA.py index e74bfff0..d405ce46 100644 --- a/modules/LoRA.py +++ b/modules/LoRA.py @@ -77,7 +77,7 @@ def add_lora_to_model(lora_names): elif shared.args.load_in_8bit: params['device_map'] = {'': 0} - shared.model = PeftModel.from_pretrained(shared.model, Path(f"{shared.args.lora_dir}/{lora_names[0]}"), **params) + shared.model = PeftModel.from_pretrained(shared.model, Path(f"{shared.args.lora_dir}/{lora_names[0]}"),adapter_name=lora_names[0], **params) for lora in lora_names[1:]: shared.model.load_adapter(Path(f"{shared.args.lora_dir}/{lora}"), lora)