π π £π § Float To Int
The tiny converter that keeps LTX graphs valid
- INT
Float To Int is exactly what it says: it takes a floating-point number and gives you back an integer. That's the whole node. It exists because ComfyUI is strict about socket types - a widget that wants an INT (frame count, an index, a step number) will refuse a wire carrying a FLOAT, even when the value is a perfectly good whole number. This little converter is the adapter that makes those two ends meet.
It ships in ComfyUI-LTXVideo, Lightricks' official pack, and it earns its place there for a specific reason: some LTX nodes output floats that other LTX nodes need as ints. The obvious one is latent_downscale_factor - the IC-LoRA Loader Model Only emits it as a FLOAT, and if a downstream node wants it as an INT, this is the one-hop bridge. It's glue, not glamour, but glue you'll be glad exists the moment a wire won't connect.
How it works
It reads the input value and returns its integer form. There's no rounding mode to configure and nothing to tune - one number in, one number out. Think of it as a type cast you can see on the canvas.
The inputs and outputs that matter
This is about as simple as a node gets:
- a - the input FLOAT (default 0).
- Output: an INT.
Wire a float source into a, take the INT out, and plug it into whatever integer socket was rejecting your float. Done.
Installing it
ComfyUI Manager β Install Custom Nodes β search LTXVideo β install β restart, or cd ComfyUI/custom_nodes && git clone https://github.com/Lightricks/ComfyUI-LTXVideo and restart. It appears under math/conversion. No models, no dependencies, no download - it's pure arithmetic, so it works the instant the pack is installed.
Where people get burned
Honestly, there's not much to get wrong here - but a couple of things are worth a beat:
- Assuming it rounds a particular way. It converts float to int; if the exact rounding behavior matters for your value (e.g. 2.9 vs 3.0), verify it does what you expect rather than assuming banker's rounding or ceil. For values that are already whole (which is the common case - factors, counts), it's a non-issue.
- Reaching for it when the mismatch is real. A type error sometimes means the value genuinely shouldn't be there, not that it needs casting. If a socket wants an INT and you're feeding it a fractional 0.5, converting to 0 may silently break your intent - fix the source, not the type.
- Overlooking that it's here at all. If an LTX graph won't connect a factor or count between two of the pack's own nodes, this converter is usually the missing one-node fix - no need to go hunting a third-party math pack.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| a | FLOAT | 0.00 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | β |