From 9d0bc241efd984e25fdf11e6e61d0eb538875f56 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Thu, 30 Nov 2023 01:48:26 +0900 Subject: [PATCH] fix: ImpactControlBridge - invalid queueing potential bug --- js/common.js | 6 +++--- modules/impact/config.py | 2 +- modules/impact/impact_server.py | 2 +- modules/impact/logics.py | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/js/common.js b/js/common.js index 1b14397..3365c01 100644 --- a/js/common.js +++ b/js/common.js @@ -21,7 +21,7 @@ app.ui.dialog.show = dialog_show_wrapper; function nodeFeedbackHandler(event) { let nodes = app.graph._nodes_by_id; - let node = nodes[event.detail.id]; + let node = nodes[event.detail.node_id]; if(node) { const w = node.widgets.find((w) => event.detail.widget_name === w.name); if(w) { @@ -35,7 +35,7 @@ api.addEventListener("impact-node-feedback", nodeFeedbackHandler); function setMuteState(event) { let nodes = app.graph._nodes_by_id; - let node = nodes[event.detail.id]; + let node = nodes[event.detail.node_id]; if(node) { if(event.detail.is_active) node.mode = 0; @@ -49,7 +49,7 @@ api.addEventListener("impact-node-mute-state", setMuteState); async function bridgeContinue(event) { let nodes = app.graph._nodes_by_id; - let node = nodes[event.detail.id]; + let node = nodes[event.detail.node_id]; if(node) { const mutes = new Set(event.detail.mutes); const actives = new Set(event.detail.actives); diff --git a/modules/impact/config.py b/modules/impact/config.py index 755556a..e278a1b 100644 --- a/modules/impact/config.py +++ b/modules/impact/config.py @@ -2,7 +2,7 @@ import configparser import os -version = "V4.36.2" +version = "V4.36.3" dependency_version = 19 diff --git a/modules/impact/impact_server.py b/modules/impact/impact_server.py index 8640ad0..2f322e1 100644 --- a/modules/impact/impact_server.py +++ b/modules/impact/impact_server.py @@ -437,7 +437,7 @@ def regional_sampler_seed_update(json_data): new_seed = random.randint(0, 1125899906842624) if new_seed is not None: - server.PromptServer.instance.send_sync("impact-node-feedback", {"id": k, "widget_name": "seed_2nd", "type": "INT", "value": new_seed}) + server.PromptServer.instance.send_sync("impact-node-feedback", {"node_id": k, "widget_name": "seed_2nd", "type": "INT", "value": new_seed}) def onprompt(json_data): diff --git a/modules/impact/logics.py b/modules/impact/logics.py index 328951b..f8c48f5 100644 --- a/modules/impact/logics.py +++ b/modules/impact/logics.py @@ -314,7 +314,7 @@ class ImpactQueueTriggerCountdown: def doit(self, signal, count, unique_id): if count > 0: PromptServer.instance.send_sync("impact-node-feedback", - {"id": unique_id, "widget_name": "count", "type": "int", "value": count-1}) + {"node_id": unique_id, "widget_name": "count", "type": "int", "value": count-1}) PromptServer.instance.send_sync("impact-add-queue", {}) return (signal, count) @@ -362,7 +362,7 @@ class ImpactSetWidgetValue: if value is not None: PromptServer.instance.send_sync("impact-node-feedback", - {"id": node_id, "widget_name": widget_name, "type": kind, "value": value}) + {"node_id": node_id, "widget_name": widget_name, "type": kind, "value": value}) return (signal,) @@ -385,7 +385,7 @@ class ImpactNodeSetMuteState: OUTPUT_NODE = True def doit(self, signal, node_id, set_state): - PromptServer.instance.send_sync("impact-node-mute-state", {"id": node_id, "is_active": set_state}) + PromptServer.instance.send_sync("impact-node-mute-state", {"node_id": node_id, "is_active": set_state}) return (signal,) @@ -472,13 +472,13 @@ class ImpactControlBridge: if mode: should_active_but_muted = output_set - prompt_set if len(should_active_but_muted) > 0: - PromptServer.instance.send_sync("impact-bridge-continue", {"id": unique_id, 'actives': list(should_active_but_muted)}) + PromptServer.instance.send_sync("impact-bridge-continue", {"node_id": unique_id, 'actives': list(should_active_but_muted)}) 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.") else: should_muted_but_active = prompt_set.intersection(output_set) if len(should_muted_but_active) > 0: - PromptServer.instance.send_sync("impact-bridge-continue", {"id": unique_id, 'mutes': list(should_muted_but_active)}) + PromptServer.instance.send_sync("impact-bridge-continue", {"node_id": unique_id, 'mutes': list(should_muted_but_active)}) 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.")