Γ· Divide
Simple division, one important rounding surprise
- FLOAT
- INT
Divide [DVB] is the pack's plain-vanilla division node: a divisor (integer, default 2), a float input, an int input, and both a FLOAT and an INT output. If you need to cut a duration in half, split a frame budget, or scale any number in a video workflow, this is the boring, reliable tool for it. Its sibling Multiply [DVB] does the same thing in the other direction; between the two, plus Calculation [DVB] for anything more than one operation, the pack covers all the arithmetic a batch workflow usually needs.
How it actually divides
The behavior is worth one close look because it's easy to misread. The node computes (float + int) / divisor - it adds your two number inputs together and divides the sum. So if you've got 24 frames in int and 0.0 in float, dividing by 2 gives you 12.0 on the FLOAT output and 12 on the INT output. If you feed it 25 in int and divide by 2, the FLOAT comes out 12.5 and the INT comes out... 12. Not 13. The integer output uses math.floor, not rounding, which is a genuinely useful detail: when you're splitting a frame count into two halves, flooring keeps you from ever overrunning the available frames. Rounding could hand you 13 when only 12.5 exist; flooring can't.
When you'd reach for it
Frame math is full of divisions that need to stay conservative. Split a 97-frame clip into two passes and you want each side to be 48, not 49 - the floor is doing you a favor. Halve a frame rate divisor, halve a fade length, divide a resolution factor - it's all the same pattern. The node also plays nicely with the pack's own conventions: because it emits both a float and an int, you can wire the FLOAT into a fade_seconds-style input and the INT into a frame-count or index input without a conversion node in between.
The honest caveats
It's a utility node, so keep expectations proportional. If you need named variables or more than one operation, skip it and use Calculation [DVB] - the expression node has the same FLOAT/INT outputs and far more power. And remember the addition behavior: float and int are summed before the division, so zeroing one of them is the right move when you only care about the other. There's no surprise there, just a quirk worth internalizing.
Install
Identical to every node in this pack:
cd ComfyUI/custom_nodes
git clone https://github.com/alt-key-project/comfyui-dream-video-batches.git
cd comfyui-dream-video-batches
pip install -r requirements.txt
Restart ComfyUI. ComfyUI Manager users can search "Dream Video Batches" instead. No model downloads - this is pure scalar arithmetic, and the pack's pip dependencies (imageio, pilgram, scipy, numpy, torchvision, evalidate) are all lightweight.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| divisor | INT | 2 | β |
| float | FLOAT | 0.00 | β |
| int | INT | 0 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| FLOAT | FLOAT | β |
| INT | INT | β |