Video Resolution
The tiny node that knows every video model's magic numbers
- width
- height
- resolution_str
Every video model has a secret list of sizes it will actually accept. LTX and Mochi want multiples of 64. CogVideoX, Hunyuan and Wan settle for multiples of 16. And if you hand-type 1920x1080 into their latent nodes anyway, the model doesn't error - it quietly snaps, or integer-divides and drops a pixel. No message, just subtly worse output. Video Resolution is a one-file utility node that bakes those rules in, so you stop memorizing them.
That's the whole pitch. It's not a workflow or a pipeline; it's plumbing - a pair of INT outputs that feeds width and height into your video model's latent or empty-video node, the same job Empty Latent Image does for SDXL but with the divisibility quirks of video generators handled for you.
How it works
Pick a resolution preset (480p through 4320p/8K, or Custom), an aspect_ratio (13 of them, from 1:1 and 16:9 up to CinemaScope and 9:21), and a scale (0.25x–2x). The node derives the second dimension from the aspect ratio, quantizes both to your target's divisibility, clamps to a sane minimum, and hands you two clean INTs plus a "1921x1057"-style string.
The bit that makes it useful instead of a glorified calculator is model_profile. Set it to your model once and it forces the right rules - LTX/LTX2 and Mochi get divisible_by = 64, CogVideoX/Hunyuan/Wan get 16 - and it turns off the legacy add_one behavior. Choosing "Custom" is the only way your manual divisible_by and add_one settings are actually respected.
The inputs that matter
- model_profile - the one you should touch. It overrides the finicky controls below.
- resolution + aspect_ratio + scale - set the ballpark; the profile handles the snapping.
- rounding_mode - defaults to
floor, meaning it always rounds down. Setnearestif you'd rather land on the closest valid size. - swap - flip width and height for vertical 9:16 work instead of re-picking aspect ratios.
Everything else (custom_width, custom_height, custom_mode) only applies when resolution = Custom: manual uses your numbers as-is, while from_width and from_height recalculate the other side from the aspect ratio.
What comes out
width and height as INTs - wire those straight into your video model's latent inputs. There's also resolution_str (e.g. "1281x721"), handy for logging or passing into a text-overlay node if you label your generations.
Installing it
It's the easiest kind of install: pure Python, one file, no models, no GPU, no extra dependencies, MIT-licensed. In ComfyUI Manager just search for "Video Resolution", or:
cd ComfyUI/custom_nodes
git clone https://github.com/hyukudan/comfyui-video-resolution
Restart ComfyUI. In the node menu it's under the video category - and it answers to the aliases "video size" and "ltx resolution", which is how most people actually find it.
Gotchas worth knowing
The add_one quirk is the one that'll confuse you if you've been following older LTX tutorials. Legacy LTX-style sizing used divisible_by = 32 plus one pixel - that's where weird numbers like 513x513 or 1281x721 come from. The author's code comment explains why they now default away from it: LTX latent creation integer-divides by 32 and silently drops the extra pixel, so the +1 only "worked" by accident. If you copy an old workflow expecting 1281x721, remember the default profile gives you clean 1280x720 instead - the mismatch is intended, not a bug.
Second gotcha: because the default profile is LTX, if you switch models and forget to change model_profile, your Hunyuan run will be quantized to 64 when it only needs 16. Not fatal, just wasteful. Set the profile once, and the node earns its keep.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 720p | 7 options: 480p, 720p, 1080p, 1440p (2K), 2160p (4K), 4320p (8K), +1 |
| aspect_ratio | COMBO | 16:9 (Widescreen) | 13 options: 1:1 (Square), 16:9 (Widescreen), 19:9 (Cinematic Mobile), 2.39:1 (CinemaScope), 9:16 (Vertical), 4:3 (Classic), +7 |
| scale | COMBO | 1x | 7 options: 0.25x, 0.5x, 0.75x, 1x, 1.25x, 1.5x, +1 |
| model_profile | COMBO | LTX Video / LTX2 | 6 options: Custom, LTX Video / LTX2, CogVideoX, Hunyuan Video, Mochi, Wan 2.x |
| custom_mode | COMBO | manual | 3 options: manual, from_width, from_height |
| custom_width | INT | 128064–16384 | — |
| custom_height | INT | 72064–16384 | — |
| divisible_by | COMBO | 32 | 4 options: 8, 16, 32, 64 |
| rounding_mode | COMBO | floor | 3 options: floor, nearest, ceil |
| add_one | BOOLEAN | true | — |
| swap | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | Width in pixels |
| height | INT | Height in pixels |
| resolution_str | STRING | Resolution as string (e.g. 1281x721) |