Nodes/FlowNodes/πŸ’» Print to console
ComfyUI Node

πŸ’» Print to console

The node that tells you what your graph is actually doing

By gitmyloΒ·Created 2 years agoΒ·Updated about a year agoΒ· 13
πŸ’» Print to console
  • Value
  • no_cache
  • Flow

Every node pack eventually ships one of these, and it's always the least glamorous and most useful thing in the box. "πŸ’» Print to console" takes any value - a string, an int, a latent, a whole Python object - and dumps it to the terminal where you started ComfyUI. That's it. That's the entire feature. It exists so you can see what a value actually is when the graph is lying to you.

Why you need it despite the name

ComfyUI caches aggressively and only reruns what it thinks changed, which makes debugging a graph by reasoning alone a losing game. The fastest way to answer "what is actually in this socket?" is to print it. The Value input is * (wildcard), so you can tap literally any wire: drop the node on a prompt, a seed, a batch of images, a conditioning - whatever. Run. Read the terminal. Move on.

Two things make it better than a DIY debug node:

  • It's marked an output node (OUTPUT_NODE = True). That means it always runs, even when nothing downstream of it needs to, and you can queue a run with just this node in the path. No "I attached a printer to a branch that never executes" trap.
  • It emits a Flow output, so you can chain it into FlowNodes' flow system: print β†’ flow β†’ next function forces the print to happen before the next ordered operation, which matters when you're debugging ordering issues rather than values.

The no_cache input

There's a required input in the schema that looks weird: no_cache, type NO_CACHE. You don't wire anything to it - it's a dummy input that FlowNodes' frontend renders as a zero-height widget that produces a random value every run. Its whole job is to defeat ComfyUI's cache and guarantee this node (and everything downstream of it) executes every single time. You'll see the same socket on FlowNodes' other function nodes. Leave it alone, that's the intent.

If your print doesn't fire on a re-run, that's the caching engine at work - but with no_cache present it shouldn't happen.

Where you actually use it

  • Inspecting a regex result before it feeds a filename template.
  • Confirming a switch really is routing the branch you think it is.
  • Debugging an Execute Python script - print intermediate values from inside the script, or print the script's output here.
  • Watching the persistent dict grow between runs.

Note the output goes to the ComfyUI console/terminal, not to a widget on the canvas. If you want the value visible in the UI, you need a Show Text-style node from another pack - different tool, same debugging urge.

Install

In the FlowNodes pack, so: ComfyUI Manager β†’ search FlowNodes β†’ install β†’ restart, or:

cd ComfyUI/custom_nodes
git clone https://github.com/gitmylo/FlowNodes
# restart ComfyUI

Zero Python dependencies, no models. It's a WIP pack; if printing an exotic object raises instead of pretty-printing, that's a known rough edge, and the fix lives on the GitHub issues page.

Troubleshooting

  • Nothing prints - check the terminal, not the UI; also confirm the run actually reached this node (an upstream error aborts the graph before it).
  • Printing a huge object - batches and dicts print one giant line. That's normal; you'll learn to love Console print of a len(...)-style value instead.
  • Node runs but downstream doesn't re-run - you're relying on the print's Flow output to order things; make sure the next node actually takes the flow wire.
CategoryπŸ”‚ FlowNodes/function

Inputs (2)

NameTypeDefaultDescription
Value*β€”
no_cacheNO_CACHEβ€”

Outputs (1)

NameTypeDescription
FlowFLOWβ€”