aboutsummaryrefslogtreecommitdiff
path: root/extensions-builtin/Lora/network_full.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-08-24 11:09:04 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-08-24 11:09:04 +0300
commit189229bbf9276fb73e48c783856b02fc57ab5c9b (patch)
tree728b1ab97fec6d18a1ec687ba552ca83b0dcf109 /extensions-builtin/Lora/network_full.py
parent31f2be3dcedf85c036c5f784c640208d122b62ed (diff)
parentb6c02174050b2c5dd98bf24c797e85ff269516f5 (diff)
Merge branch 'dev' into release_candidate
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)