ComfyUI Node Runs on cloud

Interact

A live Python REPL wired into your workflow

By ali1234·Created 3 years ago·Updated 3 months ago· 130
Interact
  • a
  • b
  • c
  • d

    Most debug nodes in ComfyUI print a value to the console and move on. Interact does something a lot more direct: wire up to four values into it, and the moment ComfyUI evaluates the node, it drops you into a live Python REPL - on the actual terminal you launched ComfyUI from - with those four values sitting there as local variables you can poke at, inspect, and mutate. It's a genuine debugger built straight into the graph, not a fancier print statement.

    How it works

    When the node runs, it checks whether the process actually has a TTY (a real interactive terminal) attached. If it does, it opens a Python REPL right there, with your a/b/c/d inputs available as variables. It also does two things worth knowing about: it temporarily restores the original stdout/stderr around the REPL session, because ComfyUI-Manager patches those streams in a way that otherwise breaks GNU Readline (so without this, arrow keys and history wouldn't work in the REPL); and it swaps in a custom exit()/quit() so typing either out of habit doesn't accidentally take down your whole ComfyUI server.

    The important behavior for anyone running ComfyUI somewhere other than their own desktop: if there's no TTY attached, it doesn't hang - it just prints a skip message and moves on. That covers headless servers, containers, and cloud/serverless executors. If you accidentally leave an Interact node wired into a workflow you queue somewhere headless, it's a harmless no-op, not a stuck job.

    The inputs and outputs that matter

    • a, b, c, d - all optional, all wildcard * type. Wire in whatever you want to inspect at that point in the graph.

    There are no outputs - this is a pure side-effect node (is_output_node: true). It doesn't feed anything downstream; it exists purely to stop and let you look.

    How to install it

    Via ComfyUI Manager: search comfyui-job-iterator, install, restart. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ali1234/comfyui-job-iterator
    

    then restart. No dependencies.

    Common issues & troubleshooting

    Your local ComfyUI queue just... stops, with no error. That's not a crash - it's this node doing exactly what it's designed to do. Check the terminal window you launched ComfyUI from; there should be a >>> prompt waiting for input. Type your check, then exit with Ctrl-D (Unix) or Ctrl-Z followed by Enter (Windows) to let the graph continue.

    Don't leave one in a workflow you queue and walk away from. Locally, this node genuinely blocks execution until you interact with it or exit. It's a debugging tool for a session you're actively watching, not something to leave wired into a production or unattended workflow.

    On comfy.icu or any other headless/serverless host, it's safe but does nothing useful. No TTY means it just logs a skip and continues - you won't get a broken run, but you also won't get a REPL. If you need to inspect values on a host like that, use a plain debug/print node instead, or the pack's Stringify node to dump values into your normal logs.

    Categoryali1234/debug

    Inputs (4)

    NameTypeDefaultDescription
    aopt*
    bopt*
    copt*
    dopt*

    Outputs (0)

    No outputs