Round Up
The least glamorous node that keeps video math honest
- int
- float
Round Up does exactly one thing: takes a float and always rounds up - ceiling, not round-half-up - then hands you the result as both an INT and a FLOAT. That's the whole node, and it's worth more than it looks, because ComfyUI video workflows are full of places where a fractional frame count will silently break you.
The classic case: you computed a duration or a frame count from a rate and it came out to 89.4. Feed that into a node that expects a whole number of frames and you either get a type error or, worse, a silently truncated result. Ceiling means "always take the next whole frame," which is the safe direction for lengths - one extra frame is a rounding error, one missing frame is a jump cut.
Why you'd reach for it
- A node outputs frames-per-second as a float and the next node wants an INT.
- You're building a batch count from
duration * fpsand you can't afford to lose the fractional frame. - Anything that pads to a model's frame grid (Wan's 4k+1, MiniMax H3's 17k+5, the frame adjusters in this same pack) - you generally want to round up to hit the grid, and this is the tool.
There's also a quiet design choice worth knowing: it outputs both types from one computation, so one node feeds either a FLOAT or INT socket downstream. You never have to split the wire or add a converter. That's the kind of small thoughtfulness the rest of the TrentNodes pack has in spades.
Using it
One input, value (a FLOAT, default 0). Two outputs:
int-ceil(value)as an integerfloat- the same result as a float
That's it. There's no optional input, no mode toggle, nothing to misconfigure. If you've been around ComfyUI long enough, you know a node this simple is the kind you end up using more than the impressive ones, because the impressive ones keep tripping on the math this one handles.
Install and the "why is this in a pack" question
It ships in TrentNodes, the TrentHunter82/TrentNodes pack - install the pack and you get it:
# ComfyUI Manager: search "Trent Nodes"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes && pip install -r requirements.txt
No extra dependencies for this one; it's pure Python (math.ceil under the hood). Is it overkill to install a 69-node pack for a ceil function? Slightly. But you won't install it for this - you'll install the pack for Cut Detective or the H3 nodes, and Round Up will quietly be there saving you from a broken frame count somewhere you forgot to expect one. Think of it as the spare tire that came with the car.
One honest caveat: if you need a reusable rounding node that can floor, round, or round-to-nearest too, this isn't it - it only ever rounds up, on purpose. If you want the other directions, you're in WAS Node Suite territory. For "always go up to the next frame," this is the one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | FLOAT | 0.00-999999–999999 | Input number to round up |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| int | INT | ceil(value) as an integer |
| float | FLOAT | ceil(value) as a float |