Convert to Int
Force any wired value into a plain integer
- input1
- INT
ComfyUI is strict about connection types - a node that wants an INT won't take a FLOAT or a STRING output, even when the value would convert cleanly by hand. ConvertAny2Int is the fix for that specific annoyance: wire in whatever you've got, get a plain INT back out.
It's the integer member of a five-node conversion family in ComfyUI-LogicUtils (alongside ConvertAny2Dict, ConvertAny2List, ConvertAny2Set, and ConvertAny2Tuple), a utility pack by GitHub user aria1th - publicly known as AngelBottomless, the trainer behind Illustrious XL. LogicUtils sits outside that training work entirely; it's general glue-code for people building programmatic, logic-heavy ComfyUI graphs - loops, batch data prep, type bridging - rather than a straightforward generation pipeline. It's a small, sparsely documented corner of the ecosystem by the pack's own admission: the README says "proper documentation is being prepared, however there are too many nodes," and it shows in how thin the per-node descriptions are.
How it works
There's not much mystery to this one relative to its siblings - input1 is typed *, ComfyUI's wildcard, so it accepts a connection from any node's output. Whatever value arrives gets cast to a Python int and passed on. This is the most straightforwardly predictable of the ConvertAny2* family, since integer coercion behaves the way you'd expect from plain Python: a float truncates, a numeric string parses, and so on - though as with the rest of the pack, the exact edge-case behavior isn't documented, so it's worth a quick test with your actual data before relying on it in a larger graph.
The inputs and outputs that matter
input1(*, default0) - the only input, accepts any wired type.- Output: a single
INT- feed it into whatever node requires that exact type, like a seed, batch count, or loop-index input that won't accept a float or string.
How to install it
Through ComfyUI Manager: search ComfyUI-LogicUtils, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/aria1th/ComfyUI-LogicUtils
Restart ComfyUI. No models to download - it's pure Python conversion logic, nothing GPU-adjacent. The README mentions an opt-in auto-install hook (COMFYUI_LOGICUTILS_AUTO_INSTALL=1, and COMFYUI_LOGICUTILS_SKIP_INSTALL=1 to force it off) for heavier parts of the pack; this node doesn't touch it.
Common issues & troubleshooting
A connection that used to work now throws a type error. ComfyUI type-checks connections at the graph level, so if an upstream node's output type doesn't literally match what a downstream node wants - even when the values would convert fine logically - you'll get a hard error rather than a silent conversion. That's the exact situation this node exists to patch: drop it in between the two and wire through it instead.
Unexpected value after conversion. If you're feeding it a STRING that isn't a clean number, or a FLOAT with a fractional part you expected to be rounded rather than truncated, check the actual output before assuming - Python's int() truncates toward zero rather than rounding, and this node isn't documented to behave any differently.
A node referenced in a shared workflow isn't showing up. LogicUtils's node list has grown over time through pull requests. If something's missing from your install, check the GitHub repo for the current node set rather than assuming Manager's listing is complete.
You're wondering if you even need this. If both ends of a connection already agree on INT, you don't - this node exists purely to bridge a type mismatch, not as something to insert as a matter of habit.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input1 | * | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |