We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9ed2c45 commit 9256e93Copy full SHA for 9256e93
modules/LoRA.py
@@ -15,4 +15,8 @@ def add_lora_to_model(lora_name):
15
else:
16
# Why doesn't this work in 16-bit mode?
17
print(f"Adding the LoRA {lora_name} to the model...")
18
- shared.model = PeftModel.from_pretrained(shared.model, Path(f"loras/{lora_name}"))
+
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