Revert "Update extra_networks_lora.py"

This reverts commit a815b3db54.
This commit is contained in:
lllyasviel
2024-01-25 11:26:41 -08:00
parent a815b3db54
commit 005b8d3869

View File

@@ -10,8 +10,14 @@ class ExtraNetworkLora(extra_networks.ExtraNetwork):
"""mapping of network names to the number of errors the network had during operation""" """mapping of network names to the number of errors the network had during operation"""
def activate(self, p, params_list): def activate(self, p, params_list):
additional = shared.opts.sd_lora
self.errors.clear() self.errors.clear()
if additional != "None" and additional in networks.available_networks and not any(x for x in params_list if x.items[0] == additional):
p.all_prompts = [x + f"<lora:{additional}:{shared.opts.extra_networks_default_multiplier}>" for x in p.all_prompts]
params_list.append(extra_networks.ExtraNetworkParams(items=[additional, shared.opts.extra_networks_default_multiplier]))
names = [] names = []
te_multipliers = [] te_multipliers = []
unet_multipliers = [] unet_multipliers = []