Skip to content

Commit 9256e93

Browse files
committed
Add some LoRA params
1 parent 9ed2c45 commit 9256e93

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

modules/LoRA.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ def add_lora_to_model(lora_name):
1515
else:
1616
# Why doesn't this work in 16-bit mode?
1717
print(f"Adding the LoRA {lora_name} to the model...")
18-
shared.model = PeftModel.from_pretrained(shared.model, Path(f"loras/{lora_name}"))
18+
19+
params = {}
20+
#params['device_map'] = {'': 0}
21+
#params['dtype'] = shared.model.dtype
22+
shared.model = PeftModel.from_pretrained(shared.model, Path(f"loras/{lora_name}"), **params)

0 commit comments

Comments
 (0)