Any Print
Your graph's print statement
- value
- value
Every programming environment has a print(), and ComfyUI - which is secretly a programming environment - deserves one too. Any Print takes a value of any type and recursively dumps it to the ComfyUI console (the terminal where you launched ComfyUI, prefixed with [GadgetNodes]), then passes the value straight through so you can keep the wire going. It's the fastest way to ask the graph "what is actually in this wire?" and get an answer instead of a guess.
The inputs are both optional, which is a small but nice touch:
name- a label string (default empty). Give it a name and the dump readsname = <value>, which matters once you have six dumps in one graph.value- the anything at all you want to inspect. Wildcard type, so models, tensors, dicts, lists, strings - everything.
Output: value, unchanged, so you can drop this node inline in a chain and keep the data flowing to the next node.
The dump is genuinely well-thought-out for a debug tool. It recurses into nested dicts and lists with indentation, detects circular references instead of hanging, and for a torch tensor it prints the batch size, shape, dtype, and device - the four things you actually need when debugging a tensor, and the last of which (device) is the one people forget to check until their graph gets mysterious CUDA errors. You can see the logic in the source: numbers and strings print as type: value, tensors get the shape treatment, containers get walked.
It's from the Gadget/core section of 2daadv's ComfyUI-GadgetNodes (MIT, one developer, new pack, no community reputation yet). Install via ComfyUI Manager (search "GadgetNodes") or clone + pip install -r requirements.txt + restart. Pure Python, no frontend extension - it prints to the server log, not to the canvas, so it works identically on the legacy UI and Nodes 2.0.
How people actually use it, in order:
- "Why is this node failing?" Wire the suspicious input into Any Print, run, read the shape/type/device line, fix the actual cause. This is the debugging principle the community keeps hammering: inspect the wire, don't reseed and pray.
- Checking a dynamic value mid-run - what prompt string a text node actually produced, what index a selector picked, whether a value is
Nonewhen you thought it wasn't. - Teeing without breaking the chain, since it passes the value through.
The one trap: the output goes to the server console, not the UI. If you're running ComfyUI as a service with logs you never look at, Any Print will feel like it does nothing. That's not the node's fault - check the terminal. And since it's an output node that always runs, leaving it in a graph costs a tiny bit of execution time; take it out when you're done debugging, or at least name it so it's easy to find.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| nameopt | STRING | — | |
| valueopt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |