H3 Int Scale (divide + snap)
One integer in, a resolution-safe integer out
- value
A math node that looks almost too boring to write about, and is exactly the kind of thing you reach for at 1am when your upscale chain won't join. H3IntScale takes an integer, divides it by a number, and snaps the result to a multiple of another number. That's it. value / divide_by, rounded to the nearest multiple. Out comes an integer.
The reason it exists is the two-pass upscale path in this pack. Pass 1 renders at the master resolution divided by 1.5, then a latent upscaler's fixed x1.5 factor lands the result back on the master size. For that round trip to work, every dimension has to stay on a friendly grid - H3's latents are spatially compressed, and video models are picky about dimensions that aren't multiples of the VAE's stride. Feed 1344 into it with divide_by = 1.5 and multiple = 32 and you get 896 back, not 896.0-something a video encoder will quietly reject or the ConcatAV frame-size guard will refuse to join. That "snap" is the entire point: it's division plus the constraint that keeps the result renderable.
The inputs
value- the integer you're scaling (wire it from a resolution or frame-count upstream).divide_by- default1.5, the pass-1 divisor.multiple- default32, the grid to snap to.
One output, value, ready to feed a width, height or frames_per_shot.
There's one real gotcha, and the source comments call it out: keep master width and height divisible by (multiple * divide_by) - 48 with the defaults - or the round trip drifts. If your master is 1280x736 and 736 / 1.5 doesn't land where you expect, that's the arithmetic to check, not the node.
Install
Ships inside the H3 Multishot pack:
cd ComfyUI/custom_nodes
git clone https://github.com/jlucasmcrell/ComfyUI-H3-Multishot
or search H3 Multishot in ComfyUI-Manager. Restart, and you need ComfyUI v0.30.0+. No dependencies beyond what ComfyUI already has.
Honestly, you could reproduce this with two math nodes and a floor operation in any ComfyUI. But if you're running this pack's two-pass workflows, using the node they were designed against means the exact snap they depend on, with no chance of your homebrew rounding landing one off the grid. Sometimes the boring node is the one that saves the render.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | — | |
| divide_by | FLOAT | 1.500.1–16 | — |
| multiple | INT | 321–256 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | INT | — |