Skip to content

Commit

Permalink
Merge pull request #15239 from AUTOMATIC1111/Fix-lora-bugs
Browse files Browse the repository at this point in the history
Add missing .mean() back
  • Loading branch information
AUTOMATIC1111 authored Mar 16, 2024
2 parents 63c3c4d + 9f2ae1c commit d38b390
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion extensions-builtin/Lora/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def apply_weight_decompose(self, updown, orig_weight):
orig_weight = orig_weight.to(updown)
merged_scale1 = updown + orig_weight
dora_merged = (
merged_scale1 / merged_scale1(dim=self.dora_mean_dim, keepdim=True) * self.dora_scale
merged_scale1 / merged_scale1.mean(dim=self.dora_mean_dim, keepdim=True) * self.dora_scale
)
final_updown = dora_merged - orig_weight
return final_updown
Expand Down

0 comments on commit d38b390

Please sign in to comment.