aboutsummaryrefslogtreecommitdiffstats
path: root/extensions-builtin/Lora/network.py
diff options
context:
space:
mode:
authorKohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>2023-08-12 18:35:04 +0000
committerKohaku-Blueleaf <59680068+KohakuBlueleaf@users.noreply.github.com>2023-08-12 18:35:04 +0000
commita2b83050965a1a117f2762d3b5fa8b4841777e8f (patch)
tree32e11b5c42dbc019f26f7e04f3c99d2140a6cf5a /extensions-builtin/Lora/network.py
parentbd4da4474bef5c9c1f690c62b971704ee73d2860 (diff)
downloadstable-diffusion-webui-gfx803-a2b83050965a1a117f2762d3b5fa8b4841777e8f.tar.gz
stable-diffusion-webui-gfx803-a2b83050965a1a117f2762d3b5fa8b4841777e8f.tar.bz2
stable-diffusion-webui-gfx803-a2b83050965a1a117f2762d3b5fa8b4841777e8f.zip
return None if no ex_bias
Diffstat (limited to 'extensions-builtin/Lora/network.py')
-rw-r--r--extensions-builtin/Lora/network.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/extensions-builtin/Lora/network.py b/extensions-builtin/Lora/network.py
index b7b89061..d8e8dfb7 100644
--- a/extensions-builtin/Lora/network.py
+++ b/extensions-builtin/Lora/network.py
@@ -145,10 +145,10 @@ class NetworkModule:
if orig_weight.size().numel() == updown.size().numel():
updown = updown.reshape(orig_weight.shape)
- if ex_bias is None:
- ex_bias = 0
+ if ex_bias is not None:
+ ex_bias = ex_bias * self.multiplier()
- return updown * self.calc_scale() * self.multiplier(), ex_bias * self.multiplier()
+ return updown * self.calc_scale() * self.multiplier(), ex_bias
def calc_updown(self, target):
raise NotImplementedError()