Skip to content

Commit

Permalink
Merge pull request #66 from kohya-ss/dev
Browse files Browse the repository at this point in the history
merge dev into main
  • Loading branch information
kohya-ss authored Jan 26, 2023
2 parents 6eb7d8e + a27131a commit 97e83b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/lora_compvis.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,9 @@ def merge_weights(weight, up_weight, down_weight):
for t in ["q", "k", "v", "out"]:
del state_dict[f"{lora_info.module_name}_{t}_proj.lora_down.weight"]
del state_dict[f"{lora_info.module_name}_{t}_proj.lora_up.weight"]
del state_dict[f"{lora_info.module_name}_{t}_proj.alpha"]
alpha_key = f"{lora_info.module_name}_{t}_proj.alpha"
if alpha_key in state_dict:
del state_dict[alpha_key]
else:
# corresponding weight not exists: version mismatch
pass
Expand Down

0 comments on commit 97e83b7

Please sign in to comment.