Skip to content

Commit

Permalink
let exllama v1 models load safetensor loras (#4854)
Browse files Browse the repository at this point in the history
  • Loading branch information
lun-4 committed Dec 20, 2023
1 parent bcba200 commit 6efbe30
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/LoRA.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ def add_lora_exllama(lora_names):

lora_path = get_lora_path(lora_names[0])
lora_config_path = lora_path / "adapter_config.json"
lora_adapter_path = lora_path / "adapter_model.bin"
for file_name in ["adapter_model.safetensors", "adapter_model.bin"]:
file_path = lora_path / file_name
if file_path.is_file():
lora_adapter_path = file_path

logger.info("Applying the following LoRAs to {}: {}".format(shared.model_name, ', '.join([lora_names[0]])))
if shared.model.__class__.__name__ == 'ExllamaModel':
Expand Down

0 comments on commit 6efbe30

Please sign in to comment.