Basic Dimension Variables
One place to set your video's dimensions — and never hunt for them again
- bus
- bus
- width
- height
- frame_count
- batch_size
- fps
- seed
A video workflow has the same six numbers scattered across a dozen nodes: width, height, frame count, batch size, fps, seed. You change the resolution and spend ten minutes hunting down every empty Latent node that still thinks the video is 512 wide. Basic Dimension Variables (BDV) is SineSwiper's answer - declare those values once, in one node, and fan them out to everything else. Change them in one place and the whole graph follows.
How it works
Think of it as a tiny typed config object. You set six values (width, height, frame_count, batch_size, fps, seed) and get them back twice over: once as individual typed outputs (INT, INT, INT, INT, FLOAT, INT - so they wire straight into anything expecting a number), and once bundled into a single bus output of the custom BDV_BUS type. That bus is how the value bundle travels as one wire, and it's what the companion BDV (Router) node unpacks later in the workflow.
The defaults are tuned for animation: width/height 512, frame_count 81, batch_size 1, fps 12, seed 0x123456789abcdef0. The frame_count tooltip even calls out the naming trap: some nodes call it length - like WanImageToVideo - and this is the value that feeds it.
The bus override rule
This is the clever bit, and it's why the node composes instead of just being a set of sliders. Feed a bus from another BDV node into the optional bus input, and any input you leave at zero gets overridden by the bus's value. Non-zero inputs win. So you can chain BDV nodes down a workflow - each one overriding just the fields it cares about - and the rest inherit. Zero is the "use what came down the pipe" sentinel, which means you can't deliberately set a dimension to 0 here. That's the tradeoff, and it's a reasonable one.
What you'd actually do with it
Drop it at the head of a video workflow, wire the individual outputs into your Empty Latent, KSampler (seed), and conditioning nodes, and you have a single control panel for the whole render. Want a 1024×576, 65-frame, 16fps test? Change four fields instead of eight nodes. The BDV Router exists precisely so you can tap the bus in another part of a big workflow without dragging a wire across the whole canvas.
Inputs and outputs
Inputs: bus (optional, BDV_BUS), width, height, frame_count, batch_size, fps, seed (all with sensible animation defaults). Outputs: bus, then width, height, frame_count, batch_size, fps, seed as individual values. Output order matches input order, which keeps things easy to reason about.
Installing
Part of ComfyUI-LoadAnim-Adv by SineSwiper. ComfyUI Manager → search "LoadAnim", or:
cd ComfyUI/custom_nodes
git clone https://github.com/SineSwiper/ComfyUI-LoadAnim-Adv.git
Restart ComfyUI. No models, and the only dependencies (torch, numpy, Pillow) are already in a stock install.
Gotchas
- Zero is special. You cannot use 0 to mean "this dimension is zero," because 0 is the "inherit from bus" flag. Set nothing else and the bus carries the day.
- If nothing feeds the
businput, it defaults to an all-zero tuple, so a lone BDV with width left at 0 will happily output 0. Keep the defaults you set - the fields come with values already. - The
seedoutput hascontrol_after_generatewired up, so it can auto-roll like a KSampler's seed widget - handy for iterating, surprising if you didn't expect it to change.
It won't make your videos better, but it'll make changing them bearable, which for animation iteration is most of the battle.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| busopt | BDV_BUS | BDV bus input, from a previous BDV node. If provided, will serve as an override for any zeroed inputs. | |
| widthopt | INT | 5120–16384 | Width of the image/video |
| heightopt | INT | 5120–16384 | Height of the image/video |
| frame_countopt | INT | 810–4096 | Frame length of the animation/video. (Sometimes called 'length', in nodes like WanImageToVideo.) |
| batch_sizeopt | INT | 10–4096 | Batch size |
| fpsopt | FLOAT | 12.000–60 | Frames per second |
| seedopt | INT | 13117684674637903000–18446744073709550000 | Random seed |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| bus | BDV_BUS | BDV bus output, for use in other BDV nodes. |
| width | INT | Width of the image/video |
| height | INT | Height of the image/video |
| frame_count | INT | Frame length of the animation/video |
| batch_size | INT | Batch size |
| fps | FLOAT | Frames per second |
| seed | INT | Random seed |