Random Int To String
A random integer, delivered as text
- STRING
Random Int To String is exactly what it says on the box: roll a random integer inside a range you set, and hand it back as a STRING. ComfyUI already has a RandomNumber node that gives you a raw integer, so the entire value-add here is the string part - you're getting text you can drop into a filename, a label, or a prompt snippet without an extra conversion step.
It's the kind of node that's only useful in combination. The canonical setup: wire it into a filename or a text label so each generated image gets a random tag - something like appending the number to the save name to force uniqueness, or varying a numeric parameter textually. It's not the node you'd reach for to vary actual sampling parameters (there you want a raw int, and you have one available in core ComfyUI); it's the node you use when the number needs to be text.
The three inputs
- min - bottom of the range, default 0, floor at -100.
- max - top of the range, default 1.
- seed - the field everyone assumes gives you reproducible rolls. Read the caveat below.
One output, STRING, plain decimal text.
The seed caveat - read this before you rely on it
Here's where this node differs from its sibling Random Float To String in a way that'll bite you if you assume they behave the same. The float version seeds its random number generator from the seed input properly - same seed, same float, every time. The int version does not, in the shipped code. It builds an unseeded NumPy generator, draws the integer from that, and only uses your seed to reseed Python's separate random module - which nothing in this node actually consumes. Net effect: setting a seed on Random Int To String does not reproduce your roll. If you want seedable random integers, use the float node (rounding, or pair it with a conversion), or stick with core ComfyUI's RandomNumber node which respects its seed. If you don't care about reproducibility - and for "stamp each image with a random number" that's usually the case - it works fine as-is.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Kaleidia/KaleidiaNodes
# restart ComfyUI
Or ComfyUI Manager → "KaleidiaNodes". No dependencies, no models. It's a two-input utility you'll use occasionally and forget otherwise - the honest review of this one is that it exists to complete the pack's string-tool trio, and it does that competently as long as you don't expect seed magic.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| min | INT | 0 | — |
| max | INT | 1 | — |
| seed | INT | 6691882220–18446744073709550000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |