diff options
author | JaredTherriault <noirjt@live.com> | 2023-09-05 00:29:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-05 00:29:33 +0000 |
commit | 5e16914a4e157ab3ed96f8b7841e1290a56f4484 (patch) | |
tree | 655f4582e692f0fc3667b3b668ad365ac3ab92ae /extensions-builtin/Lora/network_full.py | |
parent | 8f3b02f09535f55d3673aa9ea589396b8614f799 (diff) | |
parent | 5ef669de080814067961f28357256e8fe27544f4 (diff) | |
download | stable-diffusion-webui-gfx803-5e16914a4e157ab3ed96f8b7841e1290a56f4484.tar.gz stable-diffusion-webui-gfx803-5e16914a4e157ab3ed96f8b7841e1290a56f4484.tar.bz2 stable-diffusion-webui-gfx803-5e16914a4e157ab3ed96f8b7841e1290a56f4484.zip |
Merge branch 'AUTOMATIC1111:master' into master
Diffstat (limited to 'extensions-builtin/Lora/network_full.py')
-rw-r--r-- | extensions-builtin/Lora/network_full.py | 7 |
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)
|