Exec Output
A text box that runs actual Python inside your graph
- dependency
This is the node in JNComfy (jn-jairo/jn_comfyui) that makes people do a double-take: a multiline text box where you type Python, and it runs - for real, inside your graph, when the workflow executes. No sandbox, no restricted subset. Whatever you write, it does.
That sounds alarming until you remember what ComfyUI already lets happen: every custom node you install runs arbitrary Python with full access to your machine the moment it's imported, no code review, no signature checking. That's not a JNComfy problem, it's how the entire ecosystem works - it's also exactly why a malicious node distributed as ComfyUI_LLMVISION was able to compromise machines back in 2024 before anyone caught on. JN_ExecOutput doesn't introduce that risk; it just hands you the same capability directly and honestly, instead of it being buried inside someone else's node.
How it works
code is your script, as plain text. is_output_node is true for this one - unlike a lot of nodes in this pack, JN_ExecOutput always runs when the graph executes, no extra wiring required to force it into the sequence. There's no return value either: outputs is empty, so this is strictly for side effects - write a file, log something, hit an API, trigger an external process. If you need a value to flow back into the rest of the graph, this isn't that node; the pack's plain JN_Exec (listed right above this one in the README) is presumably the mid-graph version, though it isn't covered here.
dependency is an optional input, typed generic, that exists purely for execution ordering - the same pattern JN_Dump uses with flow. Wire something into it if your code needs to run after a specific upstream step has actually happened, rather than trusting ComfyUI to guess the right order from a node that has no real data dependency on anything.
The inputs and outputs that matter
code(required, multiline text, defaults to empty) - the Python that actually runs.dependency(optional, any type) - forces this node to wait on whatever you wire in; it isn't passed into your code, it just pins the execution order.- No outputs. This node is a terminal step, not a value source.
Installing it
ComfyUI Manager: search "JNComfy" or "jn_comfyui". Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/jn-jairo/jn_comfyui
Restart. No extra dependencies for this node specifically - it's plain Python execution, the interpreter is already running.
Common issues & troubleshooting
Errors don't show as a nice red node. Your code's tracebacks print to the ComfyUI server console, same as any other Python exception in the process - check the terminal, not the browser, when something in the code box fails.
Sharing workflows with this node in them is not the same as sharing a normal workflow. A workflow JSON is just data - until it has a JN_ExecOutput node with code in it, at which point loading and running that workflow executes whatever's in the box, with no prompt and no warning. Treat a shared workflow containing this node exactly like you'd treat a shared script: read the code before you run it.
It seems to freeze the queue. Long-running code in the box blocks the same way any slow node would - ComfyUI doesn't run this in a background thread for you. If you need async behavior, write it yourself inside the code.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| code | STRING | — | |
| dependencyopt | * | — |
Outputs (0)
No outputs