From 9f2ae1cb85015ee3cc79f1de92641032df154d5b Mon Sep 17 00:00:00 2001 From: KohakuBlueleaf Date: Wed, 13 Mar 2024 11:47:33 +0800 Subject: [PATCH] Add missing .mean --- extensions-builtin/Lora/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-builtin/Lora/network.py b/extensions-builtin/Lora/network.py index 183f8bd7c..473ba29e8 100644 --- a/extensions-builtin/Lora/network.py +++ b/extensions-builtin/Lora/network.py @@ -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