Py Int To String
An Integer That Needs to Be Text? One Node, No Rounding Drama
- STRING
Some nodes want numbers, some want words, and occasionally a number needs to travel as a word - a step counter going into a text label, a seed going into a filename, a row count getting stamped onto a chart. Py Int To String is the handoff: INT in, STRING out.
It's the sibling of Py Float To String, and it's just as boring and just as useful. If you've ever sat there with a valid integer and a socket that refuses it, you already know why this node exists.
How it works
It calls Python's str(value) on the integer. Integers convert cleanly - no precision surprises like you get with floats, no rounding, nothing to second-guess. 42 becomes "42", -7 becomes "-7". The widget clamps input to a 32-bit signed range (about -2.1 billion to 2.1 billion), which covers basically everything you'd type by hand in a ComfyUI workflow.
Inputs and outputs
value- the INT to convert, default 0.
Output: a STRING with the integer's decimal representation. Wire it into any text-accepting node downstream.
Install
Part of the HowToSD/ComfyUI-Data-Analysis pack. Via ComfyUI Manager: search "Data analysis" in the Custom Node Manager, install ComfyUI-Data-Analysis, restart ComfyUI, reload the browser tab. Manual install:
cd ComfyUI/custom_nodes
git clone https://github.com/HowToSD/ComfyUI-Data-Analysis.git
mv ComfyUI-Data-Analysis data-analysis # README: example workflows rely on this folder name
pip install -r requirements.txt
No models, no GPU, and the pack's pandas/matplotlib dependencies come along automatically when Manager installs it.
Common issues
About the only way to go wrong: expecting formatting you won't get. No zero-padding, no separators - 7 stays "7", not "07". If you need padding, pad elsewhere before converting. And this is a typed INT input, so if your value lives in a string widget already, you don't need this node at all - you just have a string. Pair it with Py String To Int when you need to round-trip a value through text.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0-2147483648–2147483648 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |