fix: image gate reacts to ComfyUI Interrupt
GateBus.wait() only checked the gate's own Stop flag, so pressing ComfyUI's Interrupt left the image gate blocked. Add should_cancel to wait() (mirroring wait_payload) and pass mm.processing_interrupted from gate.py, matching the text gate. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+2
-2
@@ -27,10 +27,10 @@ class GateBus:
|
||||
cls.messages[str(node_id)] = int(message)
|
||||
|
||||
@classmethod
|
||||
def wait(cls, node_id, period=0.1):
|
||||
def wait(cls, node_id, period=0.1, should_cancel=None):
|
||||
sid = str(node_id)
|
||||
while sid not in cls.messages:
|
||||
if cls.cancelled:
|
||||
if cls.cancelled or (should_cancel is not None and should_cancel()):
|
||||
cls.cancelled = False
|
||||
raise GateCancelled()
|
||||
time.sleep(period)
|
||||
|
||||
Reference in New Issue
Block a user