Any To String ๐
The glue node that turns any wire into text
- value
- string
Sometimes a node hands you an int, a float, a boolean, or some odd typed value, and the node you want to feed it into only accepts a STRING. AnyToString is the adapter. Wire in anything, get a string out. It's plumbing, not magic - but it's the kind of plumbing that unblocks a graph in five seconds instead of making you rethink your whole layout.
Part of ComfyUI-MieNodes (ComfyUI_MieNodes), MieMieeeee's utility pack, in the Common group.
Why you'd use it
ComfyUI is strict about types. A slot that wants STRING won't take an INT wire, even though converting one to the other is trivial. That strictness is good - it catches real mistakes - but it means you occasionally need an explicit cast, and that's all this node is.
Concrete cases: you computed a number (a seed, a size, a count) and want to drop it into a text prompt or a filename. You have a boolean from FileExists and want to log it as text. You've got some value you want to write out with SaveAnythingAsFile or concatenate into a caption. AnyToString sits in the middle and makes the connection legal.
It's worth distinguishing from the pack's ShowAnythingMie, which displays a value on the node for you to eyeball. AnyToString doesn't display anything - it produces a string output on the wire that downstream nodes consume. One is for looking; this one is for feeding.
The inputs and outputs that matter
That's the whole node:
value(any type) - the thing to convert.string(STRING) - the text form of it, on the wire.
Nothing to configure. Connect, and it converts.
Installing it
ComfyUI Manager โ search ComfyUI-MieNodes โ install โ restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/MieMieeeee/ComfyUI-MieNodes
then restart. No model download. Nodes appear under the ๐ MieNodes menu.
Common issues
The string isn't formatted the way you hoped. It converts using the value's default text representation. A float might come out as 1024.0 rather than 1024; a complex structure comes out as its stringified form. If you need a specific format (say, an integer with no decimal), you may need a numeric/format node before or after it. This node casts; it doesn't pretty-print.
It's not a display node. If you just want to see a value, use ShowAnythingMie instead - it renders the content on the node. AnyToString produces a wire output and shows nothing on its own; pair it with a show/save node if you want to read the result.
It doesn't parse in reverse. This goes any โ string, not string โ number. Converting text back into an INT or FLOAT is a different node's job.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | * | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | โ |