Printf π¦βπ₯
The debug node that tells you what's actually flowing through that wire
- any
- string
Despite the name, this is not a formatting tool. It's an inspector. Give it anything - an image tensor, a numpy array, a list, a dict, a string - and it prints what it found to the console and renders the value on the node itself, so you can finally see what's actually riding on that wire instead of guessing.
Why you'd reach for it
Every ComfyUI user has had the moment: a node errors out with a cryptic type mismatch, or a workflow silently produces a single frame when you expected eight. ArchiGraph is worse than most here, because its NPARRAY type hides everything about what's inside - shape, dtype, channel order - behind a wire that looks like every other wire. Printf is the first node you should reach for when something downstream is complaining. Slap it on the suspicious output, run, and read the console.
How it works
The node takes a single any input (the type is *, so it accepts literally anything) and branches on what it finds:
- numpy array β reports
Type, Shape, Dtype - torch tensor β reports
Type, Shape, Dtype, Device - list, tuple, dict β reports the length, then one line per element with its type and value
- anything else β prints the type and value
The lines come back as a list of strings, which a small bundled JavaScript widget (lifted from pythongosssss's Custom-Scripts, credit in the source) renders as read-only multiline text right on the node. So you get both the console dump and an on-canvas readout.
Inputs and outputs
One input, any, with the tooltip "Select objects to print." The output is string, a STRING list. That's worth noting: the output is always a list, even for a single item. You can wire it into a text-saving or Show Text node, but if your target expects one plain string you'll want a list-to-string converter in between.
Installing it
Part of the ComfyUI-ArchiGraph pack. ComfyUI Manager β search "ArchiGraph" β install β restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/vincentfs/ComfyUI-ArchiGraph
cd ComfyUI-ArchiGraph
pip install -r requirements.txt # or install.bat / install.sh on Windows
This one doesn't even need the OpenCV stack to do its job, but the pack installs it anyway.
Where people get burned
The input accepts anything, which is both the point and the trap. Attach Printf to a list with ten thousand items and it will happily generate ten thousand read-only widgets, and your canvas will turn into a wall of text - or worse, the browser chokes. Keep it on small, interesting values.
Second, remember the console is half the story. The on-node widget only renders a few things legibly; for a nested dict or a huge tensor, the full detail is in the terminal where ComfyUI runs. If the widget looks empty but you know something arrived, check the console before you conclude the node is broken.
And a small ordering note: it's an output node, so it will force the chain to run even if nothing else downstream uses the result. That's usually what you want for debugging - the value has to compute before it can print - but it does mean you can't leave a Printf in a hot path without paying for it every run.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | Select objects to print. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | β |