𝙆 To Int
Force any wire into a usable integer
- input
- INT
This one does exactly what the name says and nothing more: plug in literally anything, get an integer out. That "anything" is the point - the input is typed as a wildcard, so you can wire in a float, a string that looks like a number, a boolean, whatever's coming down that link, and it'll coerce it into an INT. No config, no dropdown, just a converter you drop between two nodes that disagree about types.
KayTool itself is a Chinese developer's personal grab-bag pack - the author started it for their own convenience and it grew from there. Its actual claim to fame is the node-alignment toolbar and the resource monitor (there's a whole tutorial-series episode built around those two), not the small utility nodes like this one. Those bigger features share the install with a long tail of little converters and helpers, and To Int is one of the little ones - the kind of node you don't think about until a KSampler seed input refuses your float and you need something to fix it fast.
How it works
Under the hood it's simple rounding-and-coercion logic: floats get rounded to the nearest whole number, and anything it can't make sense of as a number defaults to 0 rather than throwing an error. That second part matters more than it looks. It means the node never stops your workflow - but it also means a typo or a disconnected upstream node doesn't fail loudly, it just quietly becomes zero. Worth knowing before you spend ten minutes wondering why your batch count is 0 instead of erroring at you.
Because it's marked as an output node, To Int also displays its result directly on the node itself as text - handy for a quick sanity check without wiring in a separate display node.
The input and output that matter
- input (any type) - wire in whatever you've got: a float from a math node, a string, a boolean.
- INT (output) - the coerced integer, ready for anything that's strict about its type (seeds, batch counts, loop indices,
Abc_Math's a/b/c slots).
That's the entire interface. There's nothing to tune.
Installing it
KayTool is a whole-pack install - you can't grab just this node. Easiest path is ComfyUI Manager: search KayTool, install, restart. Manually, it's cd ComfyUI/custom_nodes && git clone https://github.com/kk8bit/KayTool, then restart. Everything the pack needs lives under ComfyUI/custom_nodes/kaytool/, and its features (there are a lot, most unrelated to this node) get their own section in ComfyUI's settings menu once it's installed.
Common issues
The main trap is the silent-zero behavior described above: if a value you expected to flow through comes out as 0, check the upstream link before you assume the math is wrong - a broken connection or a non-numeric string will land here as 0 with no warning. Beyond that, since To Int is part of a much bigger single-repo pack, if it goes missing from your node search after an update, it's worth checking the KayTool CHANGELOG for a rename or a reshuffled category - a single-maintainer pack that ships frequent updates occasionally moves things around between versions. If the node fails to even appear after install, the usual first move applies: check ComfyUI's console output on startup for an import error from the kaytool folder before assuming the node itself is broken.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| input | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |