Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
AI-Casanova committed Dec 3, 2023
1 parent 323e2c1 commit b59f796
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extensions-builtin/Lora/extra_networks_lora.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def activate(self, p, params_list):
te_multiplier = float(params.positional[1]) if len(params.positional) > 1 else 1.0
te_multiplier = float(params.named.get("te", te_multiplier))
unet_multiplier = [float(params.positional[2]) if len(params.positional) > 2 else te_multiplier] * 3
unet_multiplier = [float(params.named.get("unet", unet_multiplier))] * 3
unet_multiplier = [float(params.named.get("unet", unet_multiplier[0]))] * 3
unet_multiplier[0] = float(params.named.get("in", unet_multiplier[0]))
unet_multiplier[1] = float(params.named.get("mid", unet_multiplier[1]))
unet_multiplier[2] = float(params.named.get("out", unet_multiplier[2]))
Expand Down
6 changes: 3 additions & 3 deletions extensions-builtin/Lora/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ def __init__(self, net: Network, weights: NetworkWeights):
def multiplier(self):
if 'transformer' in self.sd_key[:20]:
return self.network.te_multiplier
if "input_blocks" in self.sd_key:
if "down_blocks" in self.sd_key:
return self.network.unet_multiplier[0]
if "middle_block" in self.sd_key:
if "mid_block" in self.sd_key:
return self.network.unet_multiplier[1]
if "output_blocks" in self.sd_key:
if "up_blocks" in self.sd_key:
return self.network.unet_multiplier[2]
else:
return self.network.unet_multiplier[0]
Expand Down

0 comments on commit b59f796

Please sign in to comment.