Nodes/ControlFlowUtils/πŸ›‘ Halt Execution
ComfyUI Node

πŸ›‘ Halt Execution

Allows you to end the current prompt execution on demand or depending on a given condition. In order for this node to execute, it must be placed in the middle of an operation, so use the Input and Output channels as a Passthrough for any data you may wish to interrupt from being forwarded. To ensure this node runs at a specific and more predictable order, you may also connect the Output of any node of your choice to the Run_After Input of this node. This node should execute only after the previous node is done executing (lazy execution notwithstanding). You may convert this node's Disable widget to an Input to make it a Condition that you can trigger with an [IF Selector] Node. If Disable is set to False, the current prompt will be halted prematurely when this node is executed. Method will determine how the execution will be affected. Cancel Prompt will immediately interrupt execution everywhere when this node runs, whereas Block Execution will allow the execution to continue but will prevent any nodes connected to this one from running subsequently. The Clear_Queue option will additionally clear your Execution Queue and set your Auto-Queue execution mode to Disabled, allowing you to cancel any pending processes. The Alert_On_Trigger toggle will further raise an exception when the node interrupts the flow of execution, ensuring no other cached nodes continue executing after this one, giving you ample time to review your workflow's state after it has been halted. Run_After is an unused optional parameter made available only to ensure this node executes after the node it is connected to. HOVER OVER THE INPUTS AND OUTPUTS FOR MORE INFO.

By VykosXΒ·Created 2 years agoΒ·Updated 2 years agoΒ· 147
πŸ›‘ Halt Execution
  • input
  • run_after
  • *
β—„disablefalseβ–Ί
β—„methodfalseβ–Ί
β—„clear_queuefalseβ–Ί
β—„alert_on_triggerfalseβ–Ί
Category🐺 VykosX-ControlFlowUtils

Inputs (6)

NameTypeDefaultDescription
disableBOOLEANfalseWill prevent execution from being halted if set to True
methodBOOLEANfalseMethod for how to halt the prompt. Cancel Prompt will interrupt the prompt altogether whereas Block Execution will prevent any nodes that follow this one from running.
clear_queueBOOLEANfalseClear any remaining items in the queue and disable Auto-Queue mode
alert_on_triggerBOOLEANfalseRaise an alert message when this node interrupts execution
input*Any data you wish to forward through this node
run_afteropt*Optional input used only to ensure this node will run after any node you connect to this Input

Outputs (1)

NameTypeDescription
**Will return the same data sent through Input