aboutsummaryrefslogtreecommitdiffstats
path: root/extensions-builtin/Lora/network_full.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-28 12:03:46 +0000
committerGitHub <noreply@github.com>2023-08-28 12:03:46 +0000
commit9e14cac3182b53173f1c356f2f13bd1cb0cedc89 (patch)
tree12b4e04a8f17c4275c26bc23870cab0535e053e0 /extensions-builtin/Lora/network_full.py
parentf898833ea38718e87b39ab090b2a2325638559cb (diff)
parent8632452627e1341bcd447dbec3c1516f319200a0 (diff)
downloadstable-diffusion-webui-gfx803-9e14cac3182b53173f1c356f2f13bd1cb0cedc89.tar.gz
stable-diffusion-webui-gfx803-9e14cac3182b53173f1c356f2f13bd1cb0cedc89.tar.bz2
stable-diffusion-webui-gfx803-9e14cac3182b53173f1c356f2f13bd1cb0cedc89.zip
Merge branch 'dev' into patch-1
Diffstat (limited to 'extensions-builtin/Lora/network_full.py')
-rw-r--r--extensions-builtin/Lora/network_full.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/extensions-builtin/Lora/network_full.py b/extensions-builtin/Lora/network_full.py
index 109b4c2c..bf6930e9 100644
--- a/extensions-builtin/Lora/network_full.py
+++ b/extensions-builtin/Lora/network_full.py
@@ -14,9 +14,14 @@ class NetworkModuleFull(network.NetworkModule):
super().__init__(net, weights)
self.weight = weights.w.get("diff")
+ self.ex_bias = weights.w.get("diff_b")
def calc_updown(self, orig_weight):
output_shape = self.weight.shape
updown = self.weight.to(orig_weight.device, dtype=orig_weight.dtype)
+ if self.ex_bias is not None:
+ ex_bias = self.ex_bias.to(orig_weight.device, dtype=orig_weight.dtype)
+ else:
+ ex_bias = None
- return self.finalize_updown(updown, orig_weight, output_shape)
+ return self.finalize_updown(updown, orig_weight, output_shape, ex_bias)