aboutsummaryrefslogtreecommitdiff
path: root/modules/extra_networks.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/extra_networks.py')
-rw-r--r--modules/extra_networks.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/extra_networks.py b/modules/extra_networks.py
index 34a3ba63..41799b0a 100644
--- a/modules/extra_networks.py
+++ b/modules/extra_networks.py
@@ -26,12 +26,15 @@ class ExtraNetworkParams:
self.named = {}
for item in self.items:
- parts = item.split('=', 2)
+ parts = item.split('=', 2) if isinstance(item, str) else [item]
if len(parts) == 2:
self.named[parts[0]] = parts[1]
else:
self.positional.append(item)
+ def __eq__(self, other):
+ return self.items == other.items
+
class ExtraNetwork:
def __init__(self, name):
@@ -100,6 +103,9 @@ def activate(p, extra_network_data):
except Exception as e:
errors.display(e, f"activating extra network {extra_network_name}")
+ if p.scripts is not None:
+ p.scripts.after_extra_networks_activate(p, batch_number=p.iteration, prompts=p.prompts, seeds=p.seeds, subseeds=p.subseeds, extra_network_data=extra_network_data)
+
def deactivate(p, extra_network_data):
"""call deactivate for extra networks in extra_network_data in specified order, then call