Image_除法工具V2.0
Halve both dimensions with one factor — read the inputs first
- width
- height
- STRING
The name says "division tool," and your first instinct is that it divides int_1 by int_2. It doesn't. Image_除法工具V2.0 takes a width and a height and divides both by a common factor - it's a downscale-by-factor node, not a division operator. Getting that straight up front is the difference between this being useful and it confusing you.
Here's the mechanism, from the source: width = int_1 / reduce and height = int_2 / reduce. So int_1 is your width source, int_2 is your height source, and reduce is the divisor applied to both. With the default reduce = 2, you feed it a 1024×1024 and get 512×512 back - a clean half-size. Both int_1 and int_2 are forceInput sockets, so you wire them in from something like the pack's resolution picker or an image-size node, and three outputs come out: width (INT), height (INT), and a STRING that's the pair as text.
That makes it a one-stop node for the classic hires-fix chore: your sampler works at 512, your latent needs to be half of the upscaled target, and you want to express that as "divide by 2" rather than typing the exact numbers.
Two traps, both real:
reducecan be set to 0. The widget's min is 0. Set it to 0 and you divide by zero - the node errors out. Why the author let it go to 0 is anyone's guess, but check the value before you queue.- The division is Python float division, and the results are pushed out as
INT-typed sockets. Divide evenly and you're fine. Divide 100 by 3 and you get33.333...flowing into a socket that claims it's an integer - ComfyUI won't necessarily coerce it cleanly, and downstream nodes can see a float where they expected an int. Use factors that divide your dimensions evenly (2, 4, 8... the standard power-of-two factors all work), and you'll never hit it.
There's also a sibling in the pack - Image_乘法工具V2.0 does the multiply-by-factor version - and a couple of nodes whose names suggest more (there's a Image_加法工具V2.0 for add-by-factor). They form a little resolution-scaling family; this is the divide member.
Install is the pack standard:
cd ComfyUI/custom_nodes
git clone https://github.com/A719689614/ComfyUI-AC_FUNV2.0
restart, then find it under ♑AC_FUNV2.0. No models, no dependencies beyond stock ComfyUI.
The honest verdict: for the one job it does - halve (or quarter, or eighth) both dimensions with a single factor - it's tidy, and the STRING output is a freebie for filenames. But it's narrow. If you need anything more general than "divide both dimensions by N," the pack's calculator node or a proper math node will serve you better. Just remember: int_1 is width, int_2 is height, and they never divide into each other.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| int_1 | INT | — | |
| int_2 | INT | — | |
| reduce | INT | 20–10 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| STRING | STRING | — |