Any To String
Turn numbers, booleans and seed widgets into one clean string
- values
- string
The name undersells it. "Any To String" isn't the boring converter you already have - it's the one you reach for when you want a filename like portrait_seed1234_90_1.5 built out of a seed widget, an int, and a float without chaining three conversion nodes together.
What it actually does
This is a fancier take on the standard "Any to String" idea: it takes up to 16 values of any type, converts each to a string, and combines them. The conversion rules are the sensible ones - booleans become true/false, None becomes none, and everything else just gets str()'d, so an image count of 4, a float of 1.5, and a seed of 1234 all behave the way you'd expect. That predictability matters more than it sounds like it does when you're feeding the result into a Save Image filename template and you want to know exactly what you'll get.
The part that makes it worth installing over the stock node is the mode dropdown, which gives you two ways to combine:
- delimiter - joins every connected value with a separator (default
-).seed+1234+steps+30becomesseed-1234-steps-30. - pattern - slots the values into a template using
$1,$2, … placeholders."$1_$2"withhelloandworldgives youhello_world.
Unconnected slots are just skipped, so you can leave the input list grown but half-empty and it quietly does the right thing. The one thing to remember with pattern mode: the placeholder index follows the slot order, so rename your inputs or keep the wiring tidy or you'll spend a few minutes debugging why $3 isn't what you thought.
What you'll actually wire
The values input auto-grows as you connect things - up to 16 sockets, each accepting any type. The mode widget is where the real work happens. Output is a single string socket, which feeds straight into anything that takes text: Save Image filename templates, prompt strings, a text preview node, or a filename builder for your batch save.
Install
It ships in the Nifty Nodes for ComfyUI pack. Easiest path: ComfyUI Manager → search "Nifty Nodes for ComfyUI" → Install → restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Stibo/comfyui-nifty-nodes
Then restart ComfyUI. The pack is MIT-licensed and built on the new comfy_api.latest v3 API, so it plays nice with the Nodes 2.0 frontend. No models, no keys, no heavy dependencies - the pack's requirements.txt (which Manager installs for you) pulls in a few small libraries, but this node itself needs none of them. It's a fairly new pack (v2.1.0 as of mid-2026), so if you load an older workflow and it doesn't recognize the node, update the pack first.
Gotchas
The common failure mode is feeding it a value that's a list or a tensor and expecting a pretty string - you'll get Python's repr, brackets and all, because this node does str(), not formatting. If you need JSON-ish output, run the value through a Debug Any first to see what you're dealing with. And remember the pattern mode's index quirk: it counts from $1, not $0, which trips up everyone at least once.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | 'delimiter' joins all values with a separator. 'pattern' places values into a template string using $1, $2, ... placeholders. | |
| valuesopt | COMFY_AUTOGROW_V3 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | — |