Skip to content

Commit 0d44321

Browse files
authored
Merge pull request #31 from set-soft/block_msg
[ContinueFlow][Added] `message` widget
2 parents bd1d39e + 64f2633 commit 0d44321

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/basic_data_handling/control_flow_nodes.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,13 +217,19 @@ class ContinueFlow(ComfyNodeABC):
217217
This node takes a value and either passes it through or blocks execution
218218
based on the 'select' parameter. When 'select' is True, the value passes through;
219219
when False, execution is blocked.
220+
221+
When a `message` is provided ComfyUI will display it in a dialog.
222+
Leave it empty for silent operation.
220223
"""
221224
@classmethod
222225
def INPUT_TYPES(cls):
223226
return {
224227
"required": {
225228
"value": (IO.ANY, {}),
226229
"select": (IO.BOOLEAN, {"default": True}),
230+
},
231+
"optional": {
232+
"message": (IO.STRING, {"default": ""}),
227233
}
228234
}
229235

@@ -233,11 +239,11 @@ def INPUT_TYPES(cls):
233239
DESCRIPTION = cleandoc(__doc__ or "")
234240
FUNCTION = "execute"
235241

236-
def execute(self, value: Any, select: bool = True) -> tuple[Any]:
242+
def execute(self, value: Any, select: bool = True, message: str = "") -> tuple[Any]:
237243
if select:
238244
return (value,)
239245
else:
240-
return (ExecutionBlocker(None),)
246+
return (ExecutionBlocker(message if message else None),)
241247

242248

243249
class FlowSelect(ComfyNodeABC):

0 commit comments

Comments
 (0)