Eden_FloatToInt
The three-line node that ends your type errors (and quietly truncates your numbers)
- INT
Eden_FloatToInt does exactly one thing: takes a float, hands you back an int. That's the whole node, and it exists because ComfyUI will fight you over types the moment you start doing math in your graph. Once you've wired an Eden_Math result or a sampler's output into a node that only accepts INT, you'll get it.
What it actually does
The implementation is int(a) - plain Python truncation, not rounding. That distinction matters more than it sounds:
2.9becomes2, not3.2.5becomes2.-2.9becomes-2(truncation goes toward zero, so negative numbers get larger).
If you need rounding, do it in the node feeding this one: pass round(x) through an Eden_Math expression before you convert.
Inputs and outputs
- a (
FLOAT, default0) - the number to convert. - Output INT - wire this into any node expecting a whole number.
That's the complete schema. Nothing optional, no mode toggle. It's a two-wire utility.
Why you'll actually reach for it
ComfyUI's math nodes and random samplers frequently produce floats - latents need int dimensions, step counts need ints, and some nodes simply refuse a float wired into an int socket. This node sits between the math and the consumer. It also shows up in a surprisingly common spot: taking a normalized value (0β1) from something like a strength slider and converting it into a resolution or a batch count.
Installing it
Eden_FloatToInt ships in the Eden.art nodesuite (edenartlab/eden_comfy_pipelines), a pack of 70+ nodes that powers a lot of what runs on eden.art itself. Easiest path is ComfyUI Manager - search for "Eden" or "Eden.art nodesuite" and install. Manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/edenartlab/eden_comfy_pipelines
cd eden_comfy_pipelines
pip install -r requirements.txt
Then restart ComfyUI. Heads up: the pack installs a full set of pinned dependencies (clip-interrogator==0.6.0, open_clip_torch==2.26.1, transformers, scikit-image, opencv-python, and more) - you're pulling the whole suite to get a three-line converter, so expect the install to be heavier than the node.
Common issues
The only real gotcha is the truncation behavior described above - people assume float-to-int means "round to nearest" and get surprised by 3.999 β 3. Check your source value before you convert. Beyond that there's nothing to tune and nothing to break; if it's not working, it's usually a type mismatch upstream in your graph, not this node.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| a | FLOAT | 0.00 | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | β |