XB-BOX - Video Params Master
One hub for width, height, frames and FPS — with the 1+8N and golden-bucket rules built in
- Width
- Height
- Frames
- FPS
- FPS_Float
- Scale Size
Every video workflow has the same ugly parameter problem: width, height, frame count, and FPS have to be typed into half a dozen places, and if any two disagree the sampler silently degrades or the whole thing OOMs. XB_VideoParamsMaster is the pack's attempt to make that one hub. Set your video size once, and it fans the numbers out through six typed outputs that you wire into your latent, sampler, and save nodes.
The real value isn't the fan-out, though - it's the two rules the node enforces for you, because video models are brutally picky about both.
The two rules it bakes in
Frame count follows 1+8N. Video VAEs and samplers want frame counts in the 1 + 8*N family (9, 17, 25... 81, 121, 241). Feed Wan 2.2 an arbitrary length like 97 and you get odd behavior or outright failures. This node snaps your length to the safe 1+8N value automatically. The README is proud of this and it's the most useful thing here.
Golden buckets. The aspect_ratio dropdown - Free, 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, plus the LTX variants - snaps your dimensions to the official pretrained "golden buckets" (the sizes the model was actually trained at, like 480x832, 544x960). Pick 16:9, type a width, and it derives the matching height on a 16px grid. The (LTX) options switch to LTX's 32px step and its own bucket conventions, which is a thoughtful touch - different families genuinely want different alignment.
The inputs and outputs
Inputs: aspect_ratio, width (default 480), height (default 832), length (default 81), fps (INT), fps_float (FLOAT, for models that want fractional rates), and a duration_display string that just shows you the resulting clip duration as you type.
Outputs: Width, Height, Frames, FPS (INT), FPS_Float, and Scale Size (the larger of width/height - handy for the "max side" controls some nodes want).
Honest takes
The "Auto-Manual Transmission Engine" the README brags about is just the aspect-ratio snapping, so don't expect magic - expect a calculator that stops you from feeding a video model illegal dimensions. Where it genuinely earns its keep is workflow tidiness: one node, one place to change size, no five-node seed of drift. Two warnings: the duration_display widget is read-only display, not a real input (you can't type a duration into it); and the LTX ratio choices only change the snapping step - they don't know anything about your actual LTX version, so treat the LTX bucket list as a starting point, not gospel.
Install
It ships in XB_ToolBox:
cd ComfyUI/custom_nodes
git clone https://github.com/WJLUOXIAO/XB_ToolBox.git
restart, or search "XB_ToolBox" in ComfyUI Manager. Pure torch/numpy - no extra dependencies.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | Free | 11 options: Free, 1:1, 16:9, 9:16, 4:3, 3:4, +5 |
| duration_display | STRING | Video Duration: 0.00 s | — |
| width | INT | 48064–8192 | — |
| height | INT | 83264–8192 | — |
| length | INT | 811–9999 | — |
| fps | INT | 161–120 | — |
| fps_float | FLOAT | 16.001–120 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| Width | INT | — |
| Height | INT | — |
| Frames | INT | — |
| FPS | INT | — |
| FPS_Float | FLOAT | — |
| Scale Size | INT | — |