Stringify
Turn any wire into a string — and see what it actually holds
- _str
Stringify does one boring thing and does it well: whatever you wire into it becomes a string, and if you wire several things in, they come out joined into one string with a delimiter you pick. That sounds trivial until you're three hours into a batch workflow and you want to build a prompt or a filename from data that's scattered across the graph. This is that node.
It comes from Trung0246's ComfyUI-0246 pack, a one-developer grab bag that the author himself describes as "Random nodes for ComfyUI I made to solve my struggle with ComfyUI. Have varying quality." Honest framing - some of these nodes are deeply hacky. Stringify is not one of them. It's the pack's quiet utility, and it pairs naturally with the pack's more famous data-movers (Junction, Highway, Cloud) plus pretty much every other pack you already run.
How it works
The trick is that Stringify's inputs are dynamic. Drag a wire onto the node and it grows an "anything" pin; you can keep feeding it more values until the node is carrying half your workflow's state. On execution it walks every input, converts each item with Python's str(), and joins them with the _delimiter widget (default ", ", so red, blue, cat becomes red, blue, cat).
The _mode widget decides how picky the conversion is:
- basic - skips objects that have no meaningful string representation (a plain dict or list whose default
str()is useless), keeps real text and numbers. - value - stricter still: only plain built-in values like strings, ints and floats make it through.
- force - converts absolutely everything to string, no filtering. This is the one that never surprises you, and the one you'll reach for first.
The output is _str, a STRING you can run straight into a CLIP Text Encode Prompt node, a filename prefix, or anywhere text is expected. The node also prints the result right in its own box, which is handy because Stringify doubles as a quick "what is this thing actually?" debugging readout - in the same spirit as the pack's Beautify node, just for plain text.
Where it earns its keep
Three genuinely common spots:
- Building a prompt on the fly - feed it per-LoRA tag strings and a positive prompt, let it join them with a comma, then send
_strinto your text encoder. Change one tag and the whole prompt rebuilds. - Filename/prefix assembly - combine seed, model name and a date string into a single label for your save node, instead of juggling five separate string primitives.
- Logging - when a value comes out of a loop looking wrong, Stringify in
forcemode tells you what it actually is.
It's not the node you reach for when a simple String primitive does the job. It's for when text needs to be composed from other data, or when you're mid-debug and need one wire converted so you can actually read it.
Installing it
ComfyUI-0246 installs like any custom node. Easiest path is ComfyUI Manager - search "ComfyUI-0246" and hit install. Or, from the terminal:
cd ComfyUI/custom_nodes
git clone https://github.com/Trung0246/ComfyUI-0246
Restart ComfyUI and the nodes appear under the 0246 category in your node menu. There are no model downloads - this pack is pure logic. Its dependencies are light (wrapt, natsort, wat-inspector), and the code even tries to pip-install wrapt/natsort itself at load if they're missing, which usually saves you the trip.
Troubleshooting
The main gotcha is that the pack pokes at ComfyUI internals to do its fancier tricks, and upstream ComfyUI updates occasionally break those. Stringify itself is plain and stable - if you see it fail, it's almost always the pack lagging behind a ComfyUI version bump. Update the pack (Manager does this in one click) and carry on. The README's fuller docs can also be shown inside the UI if you have rgthree-comfy installed, which is a nice touch when the pack's docs have gone a little sparse.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| _mode | COMBO | 3 options: basic, value, force | |
| _delimiter | STRING | , | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| _str | STRING | — |