Output To Text Converter 📝
Dump any node's output as readable text — tensors included
- any_input
- text
ComfyUI shows you images and spits out tensors, but sometimes you just want to see the numbers. Output To Text Converter is the debug node for that: plug in almost anything - a tensor, a dict, a list, an image - and it converts it to a readable text form you can display or pipe onward. It's the closest thing this pack has to a print() for your graph.
It's the odd one out in Painting Coder Utils, sitting in the pack's Utils category rather than alongside the text or image nodes.
How it works
The input is typed * - the "any type" wildcard - so the node accepts whatever you throw at it. A format selector decides how it's rendered:
- Auto - the smart default: dicts/lists/tuples become pretty-printed JSON, numbers become strings, and tensors/arrays become a compact description like
Tensor(shape=[1, 4, 128, 128], dtype=torch.float32)instead of five thousand numbers. - JSON - forces JSON serialization with an
indentsetting (0–8, default 2). - Plain Text - just
str()of the input. - Raw -
repr(), which keeps quotes and structure visible.
The useful detail is that tensor-to-text doesn't dump the contents - it reports the shape and dtype, which is usually the thing you actually want to check when debugging a shape mismatch or a wrong-channel tensor. If the conversion hits something it can't serialize, it falls back gracefully rather than killing the node.
Inputs and output
any_input- the wildcard input (any type).format- Auto / JSON / Plain Text / Raw.indent- JSON indentation, 0–8.- Output:
text- the converted STRING.
Where you'll use it
Debugging is the headline use: confirm a latent's shape, check what a custom node actually returned, or inspect a dict output you can't see in the UI. It's also a bridge - convert some structured output to text and feed it into a Show Text Plus, a text combiner, or a node that expects a STRING. Don't expect it to generate anything; it's a lens, not a tool.
Install
ComfyUI Manager → Painting Coder Utils, or:
cd ComfyUI/custom_nodes
git clone https://github.com/jammyfu/ComfyUI_PaintingCoderUtils.git
Restart ComfyUI. No models or keys anywhere in this pack; dependencies (numpy, Pillow, torch, gradio) are already present in a stock ComfyUI. And the usual inherited-workflow warning applies: v0.3.0 renamed the node namespace, so old JSON may not resolve - fix it with docs/fix/workflow_fixer.html bundled in the repo.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| any_input | * | — | |
| format | COMBO | 4 options: Auto, JSON, Plain Text, Raw | |
| indent | INT | 20–8 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | — |