Integer Caster
One Integer In, INT/FLOAT/STRING Out
- INT
- FLOAT
- STRING
This is a type adapter and nothing more: feed it an integer, get that same value back as an INT, a FLOAT, and a STRING, all at once, from three separate output sockets. It exists purely because ComfyUI's typed sockets are strict - you can't plug an INT output straight into a slot that wants FLOAT or STRING, even when the underlying number is completely fine for both. Integer Caster is the two-second fix for that mismatch instead of you hunting down a bigger, heavier node pack just to do a type conversion.
How it works. One input, n - an INT, defaulting to 0 - described in the node's own terms as "an integer to be casted." The node returns three things from that single value: n unchanged as the INT output, float(n) as the FLOAT output, and str(n) as the STRING output. Wire it up once and pull whichever of the three the downstream node actually needs; there's nothing conditional or configurable beyond the number you feed it. Input 42, get back 42, 42.0, and "42".
Inputs/outputs. n (required INT, default 0) in; INT, FLOAT, STRING out, all three simultaneously.
This one gets barely any direct search traffic - it's sitting at single-digit search impressions with an average position near the top of the page, which tells you the same thing the node itself tells you: almost nobody goes looking for "integer caster" by name. People run into it already wired into someone else's shared workflow, trace it back to figure out what it's doing, and move on. That's exactly the right role for a primitive like this - it's connective tissue, not a destination.
Where it actually earns its keep, in the context of the rest of comfyui-yanc: a seed or a batch counter is natively an INT, and if you want it stamped into a filename via Concatenate Strings (which wants STRING inputs) or fed to some other node's FLOAT-typed slider, this is the one-node bridge that gets you there without a workaround.
Installing it. ComfyUI Manager: search "comfyui-yanc," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ka-puna/comfyui-yanc
then restart ComfyUI. No dependencies beyond the Python standard library, no models - it's a pure conversion node in a pack built to stay that lightweight throughout.
Troubleshooting. Honestly, there's not much to troubleshoot - it's a deterministic conversion with no failure modes to speak of. The one thing worth knowing going in: str(n) gives you plain digits with no zero-padding, so 7 becomes "7", not "007". If you were hoping this node would give you a padded counter for filenames, it won't - there's no width or padding option here, so you'd need to handle that formatting somewhere else in your graph rather than assume this node is broken when your file numbers don't line up neatly.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| n | INT | 0 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |
| FLOAT | FLOAT | — |
| STRING | STRING | — |