IW StringFromInt
When your seed has to become words
- STRING
IW StringFromInt takes an integer and hands it back as text. The source is str(value) - one line, nothing else. It's the sort of node you don't think about until you're staring at a workflow that needs a number inside a piece of text, and suddenly the whole graph is blocked on it.
Why you'd reach for it
ComfyUI's text and number worlds don't talk to each other directly. Wires are typed, so a KSampler's seed (an INT) won't plug into a STRING input, and no amount of pleading fixes that. StringFromInt is the bridge. The classic move: pull the seed from a KSampler, convert it, and inject it into a prompt or a filename with something like IW ReplaceString, so every generated image is labeled with the exact seed that made it. That kind of traceability is the whole point of ComfyUI's workflow-in-PNG culture - knowing which seed produced which image is what lets you go back and reproduce a result.
You'll also use it for counters and batch indexes that need to become labels, or any time an integer is doing double duty as text.
What you set
One input: value (INT). It accepts a wired input by default, so you can pull a seed straight off a sampler. The single STRING output is the same number as a string.
One honest caveat: there's no formatting here. 42 becomes "42", not "0042". If you need zero-padding for sortable filenames, this node won't do it - pad the number upstream or accept the short form. The author kept it minimal on purpose, like the rest of the iwanders/ComfyUI_nodes string family.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/iwanders/ComfyUI_nodes
Restart ComfyUI, or install via ComfyUI Manager by searching iwanders. No dependencies, no models - the whole pack is stdlib-only except one node that calls out to Ollama.
It's a tiny node with a tiny job, but it's the kind of bridge that unblocks real workflows. Next time a seed, a step count, or a frame index needs to live inside a string, you'll remember this one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |