mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2024-12-29 19:05:05 +08:00
Merge pull request #15239 from AUTOMATIC1111/Fix-lora-bugs
Add missing .mean() back
This commit is contained in:
commit
d38b390ed4
@ -173,7 +173,7 @@ class NetworkModule:
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user