Int → String
Numbers into text, for prompts and filenames
- STRING
You can't put a number into a text field, and ComfyUI is firm about it - INT wires refuse to connect to STRING ports. But text is where the useful stuff happens: filenames, saved prompts, metadata, labels. SL_IntToString is the conversion that turns 5 into "5" so you can drop an integer parameter into any string context.
The mechanism is one line of Python: str(value). No formatting, no padding, no localization - the integer's plain decimal representation, exactly as you'd type it. 5 → "5". -3 → "-3". That's the whole behavior, and it's refreshingly predictable compared to its float sibling, which drags a decimal point and possible floating-point noise along with it (SL_FloatToString gives you "5.0", this gives you "5").
Inputs and outputs:
value(INT) - the integer, default 0- Output:
STRING- its text form
Installing it
Part of ComfyUI-SimpleLogics. Manager → search "SimpleLogics" → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/danipisca07/ComfyUI-SimpleLogics
Restart, Add Node → search "Int → String" (menu group SimpleLogics/Convert). Zero dependencies, no models.
Where it shows up
- Dynamic filenames: bake a seed, step count, or batch index into a save path (
seed_4521.png). - Prompt injection: build prompts or text templates with a number literal inside, so a parameter shows up in the text the sampler sees.
- Metadata and labels: stringify a value to store it alongside your workflow or show it on a display node.
- Chaining into string operations: feed text-processing nodes that need everything as STRING.
Gotchas
- No leading zeros, no formatting. If you wanted
"007", this node won't produce it - you'd pad the string elsewhere. - It's the whole number. No decimal point, no rounding surprises - this is actually the cleaner of the two number-to-string conversions in the pack. Use it whenever your value is genuinely an integer.
- Concatenate downstream, not here. The node outputs one number as a string; combining it with other text is done by the string-concatenation or text nodes that follow, not by this node.
It's a one-trick utility with no traps. If your workflow saves files or builds text from numbers, this is the node that makes it possible.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |