Nodes/ComfyUI-LoadAnim-Adv/Basic Dimension Variables
ComfyUI Node

Basic Dimension Variables

One place to set your video's dimensions — and never hunt for them again

By SineSwiper·Created 7 months ago·Updated 7 months ago· 0
Basic Dimension Variables
  • bus
  • bus
  • width
  • height
  • frame_count
  • batch_size
  • fps
  • seed
width512
height512
frame_count81
batch_size1
fps12.00
seed1311768467463790300

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 bus input, 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 seed output has control_after_generate wired 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.

CategoryLoadAnimAdv/BDV

Inputs (7)

NameTypeDefaultDescription
busoptBDV_BUSBDV bus input, from a previous BDV node. If provided, will serve as an override for any zeroed inputs.
widthoptINT5120–16384Width of the image/video
heightoptINT5120–16384Height of the image/video
frame_countoptINT810–4096Frame length of the animation/video. (Sometimes called 'length', in nodes like WanImageToVideo.)
batch_sizeoptINT10–4096Batch size
fpsoptFLOAT12.000–60Frames per second
seedoptINT13117684674637903000–18446744073709550000Random seed

Outputs (7)

NameTypeDescription
busBDV_BUSBDV bus output, for use in other BDV nodes.
widthINTWidth of the image/video
heightINTHeight of the image/video
frame_countINTFrame length of the animation/video
batch_sizeINTBatch size
fpsFLOATFrames per second
seedINTRandom seed