Commit f3445d19 authored by GoatWu's avatar GoatWu
Browse files

bug fixed for lora merge

parent ae089db4
...@@ -449,9 +449,11 @@ def load_loras(lora_path, weight_dict, alpha): ...@@ -449,9 +449,11 @@ def load_loras(lora_path, weight_dict, alpha):
elif name in lora_diffs: elif name in lora_diffs:
name_diff = lora_diffs[name] name_diff = lora_diffs[name]
lora_diff = lora_weights[name_diff].to(param.device, param.dtype) lora_diff = lora_weights[name_diff].to(param.device, param.dtype)
param += lora_diff * alpha try:
applied_count += 1 param += lora_diff * alpha
applied_count += 1
except Exception as e:
continue
logger.info(f"Applied {applied_count} LoRA weight adjustments") logger.info(f"Applied {applied_count} LoRA weight adjustments")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment