Skip to content

Commit

Permalink
Merge pull request #16151 from AUTOMATIC1111/dora-fix
Browse files Browse the repository at this point in the history
Possible fix of wrong scale in weight decomposition
  • Loading branch information
AUTOMATIC1111 committed Jul 6, 2024
2 parents b8c3664 + bfbca31 commit 372a8e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion extensions-builtin/Lora/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,12 @@ def finalize_updown(self, updown, orig_weight, output_shape, ex_bias=None):
if ex_bias is not None:
ex_bias = ex_bias * self.multiplier()

updown = updown * self.calc_scale()

if self.dora_scale is not None:
updown = self.apply_weight_decompose(updown, orig_weight)

return updown * self.calc_scale() * self.multiplier(), ex_bias
return updown * self.multiplier(), ex_bias

def calc_updown(self, target):
raise NotImplementedError()
Expand Down

0 comments on commit 372a8e0

Please sign in to comment.