diff --git a/modules/impact/config.py b/modules/impact/config.py index bc25b7f7..641d0b8b 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -2,7 +2,7 @@ import os -version_code = [5, 5, 8] +version_code = [5, 5, 9] version = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '') dependency_version = 20 diff --git a/modules/impact/logics.py b/modules/impact/logics.py index 6e6d586c..444beb3f 100644 --- a/modules/impact/logics.py +++ b/modules/impact/logics.py @@ -2,13 +2,12 @@ import time import execution -import folder_paths import impact.impact_server from server import PromptServer from impact.utils import any_typ import impact.core as core import re - +import nodes class ImpactCompare: @classmethod @@ -646,20 +645,20 @@ def IS_CHANGED(self, value, mode, behavior=True, unique_id=None, prompt=None, ex def doit(self, value, mode, behavior=True, unique_id=None, prompt=None, extra_pnginfo=None): global error_skip_flag - nodes, links = workflow_to_map(extra_pnginfo['workflow']) + workflow_nodes, links = workflow_to_map(extra_pnginfo['workflow']) active_nodes = [] mute_nodes = [] bypass_nodes = [] - for link in nodes[unique_id]['outputs'][0]['links']: + for link in workflow_nodes[unique_id]['outputs'][0]['links']: node_id = str(links[link][2]) next_nodes = [] - impact.utils.collect_non_reroute_nodes(nodes, links, next_nodes, node_id) + impact.utils.collect_non_reroute_nodes(workflow_nodes, links, next_nodes, node_id) for next_node_id in next_nodes: - node_mode = nodes[next_node_id]['mode'] + node_mode = workflow_nodes[next_node_id]['mode'] if node_mode == 0: active_nodes.append(next_node_id) @@ -673,24 +672,21 @@ def doit(self, value, mode, behavior=True, unique_id=None, prompt=None, extra_pn should_be_active_nodes = mute_nodes + bypass_nodes if len(should_be_active_nodes) > 0: PromptServer.instance.send_sync("impact-bridge-continue", {"node_id": unique_id, 'actives': list(should_be_active_nodes)}) - error_skip_flag = True - raise Exception("IMPACT-PACK-SIGNAL: STOP CONTROL BRIDGE\nIf you see this message, your ComfyUI-Manager is outdated. Please update it.") + nodes.interrupt_processing() elif behavior: # mute should_be_mute_nodes = active_nodes + bypass_nodes if len(should_be_mute_nodes) > 0: PromptServer.instance.send_sync("impact-bridge-continue", {"node_id": unique_id, 'mutes': list(should_be_mute_nodes)}) - error_skip_flag = True - raise Exception("IMPACT-PACK-SIGNAL: STOP CONTROL BRIDGE\nIf you see this message, your ComfyUI-Manager is outdated. Please update it.") + nodes.interrupt_processing() else: # bypass should_be_bypass_nodes = active_nodes + mute_nodes if len(should_be_bypass_nodes) > 0: PromptServer.instance.send_sync("impact-bridge-continue", {"node_id": unique_id, 'bypasses': list(should_be_bypass_nodes)}) - error_skip_flag = True - raise Exception("IMPACT-PACK-SIGNAL: STOP CONTROL BRIDGE\nIf you see this message, your ComfyUI-Manager is outdated. Please update it.") + nodes.interrupt_processing() return (value, ) @@ -699,6 +695,5 @@ def doit(self, value, mode, behavior=True, unique_id=None, prompt=None, extra_pn def handle_execution_error(**kwargs): - print(f" handled") execution.PromptExecutor.handle_execution_error(**kwargs)