From bfbca310744e29d502e56c11dc212323bc9158ab Mon Sep 17 00:00:00 2001 From: Kohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com> Date: Fri, 5 Jul 2024 18:56:39 +0800 Subject: [PATCH] possible fix of wrong scale https://github.com/comfyanonymous/ComfyUI/pull/3922 --- extensions-builtin/Lora/network.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/extensions-builtin/Lora/network.py b/extensions-builtin/Lora/network.py index 20f8df3d4..3c39c49d7 100644 --- a/extensions-builtin/Lora/network.py +++ b/extensions-builtin/Lora/network.py @@ -204,10 +204,12 @@ class NetworkModule: 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()