Int To String ๐
Turn a number into text so ComfyUI stops complaining
- string
IntToString does exactly what the name says: it takes an integer and outputs it as a string. One input, one output, no options. It's glue - the kind of one-line node you install a whole pack for without ever thinking about it, until the day your graph needs it and nothing else will do.
It's a "String Operator" node in ComfyUI-MieNodes, MieMieeeee's utility pack.
Why a node this small exists
ComfyUI is strict about types. An INT socket and a STRING socket are different colors and they won't connect - the editor physically refuses the wire. So the moment you want to use a number as text, you're stuck, and you need a converter in between. That's this node's entire reason to exist.
Concrete cases where you hit it:
- You've got a seed, a step count, or a computed dimension as an INT, and you want to stitch it into a filename or a prompt string. Text-building nodes take STRING inputs, so the number has to be converted first.
- You want to display a number with a ShowAnything node or fold it into a caption. Same deal - it has to become a string.
- You're building a cache-key or label out of several values and one of them is numeric.
None of this is glamorous, but a graph that can't turn 42 into "42" is a graph that's stuck, and hunting for the converter node mid-build is exactly the friction the "Common"/"String Operator" corner of a utility pack is there to remove.
How it works
value(INT, required, default0) - the number to convert.
The single output is string (STRING) - the same value as text, ready to plug into any string input.
That's the whole node. There's nothing to configure and nothing to get wrong.
Installing it
Install the pack. ComfyUI Manager โ search ComfyUI-MieNodes (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 sheep-emoji ๐ MieNodes menu.
Common issues
It only takes an INT, not a float. If the number you're holding is a FLOAT, this node's socket won't accept it - you'll need to round or cast it to an integer first. The pack's RoundToMultiple node conveniently outputs both a FLOAT and an INT, so if your number came from there, grab the INT leg and feed it straight in.
Formatting is plain. You get the bare digits - no zero-padding, no thousands separators. If you specifically need 0007 rather than 7 (for sortable filenames, for instance), do the padding downstream or, for dataset files, let BatchRenameFiles handle the zero-padded numbering for you.
Honestly, there's not much to troubleshoot. It's a type converter. It converts.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string | STRING | โ |