A simple ComfyUI node for selecting video resolutions. Outputs width and height for video generation models like LTX, CogVideo, Hunyuan, and others.
Search for "Video Resolution" in ComfyUI Manager and install.
cd ComfyUI/custom_nodes
git clone https://github.com/hyukudan/comfyui-video-resolution.gitRestart ComfyUI after installation.
Search for "Video Resolution" in the node menu (or use aliases: "video size", "ltx resolution", "ltx2").
| Parameter | Description |
|---|---|
| resolution | Preset: 480p, 720p, 1080p, 1440p (2K), 2160p (4K), 4320p (8K), or Custom |
| aspect_ratio | 1:1, 16:9, 19:9, 2.39:1, 9:16, 4:3, 5:4, 3:4, 4:5, 21:9, 9:21, 3:2, 2:3 |
| scale | Multiply resolution: 0.25x, 0.5x, 0.75x, 1x, 1.25x, 1.5x, 2x |
| model_profile | Applies recommended sizing rules for common video models. Custom leaves divisible_by and add_one untouched |
| custom_mode | In Custom: manual uses width+height as-is, from_width recalculates height from aspect_ratio, from_height recalculates width |
| custom_width | Custom width reference value |
| custom_height | Custom height reference value |
| divisible_by | Ensure dimensions are divisible by: 8, 16, 32, or 64 |
| rounding_mode | Quantization mode for divisibility: floor, nearest, or ceil |
| add_one | Add +1 to dimensions when the target model really requires it |
| swap | Swap width and height |
| Output | Type | Description |
|---|---|---|
| width | INT | Width in pixels |
| height | INT | Height in pixels |
| resolution_str | STRING | Resolution as text (e.g., "1281x721") |
| Preset | 1:1 | 16:9 | 9:16 |
|---|---|---|---|
| 480p | 481x481 | 833x481 | 481x833 |
| 720p | 705x705 | 1281x705 | 705x1249 |
| 1080p | 1057x1057 | 1921x1057 | 1057x1889 |
| 4K | 2145x2145 | 3841x2145 | 2145x3809 |
Values shown with divisible_by=32, add_one=True (legacy LTX-style sizing).
resolution = Custom+custom_mode = manual: the node usescustom_widthandcustom_heightdirectly.resolution = Custom+custom_mode = from_width: changingaspect_rationow updates the height.resolution = Custom+custom_mode = from_height: changingaspect_rationow updates the width.- If
resolutionis notCustom,custom_widthandcustom_heightare ignored. - If you want the closest valid size instead of always rounding down, use
rounding_mode = nearest.
LTX Video / LTX2: forcesdivisible_by = 64andadd_one = Falsefor compatibility with theComfyUI-LTXVideoworkflows in this repoCogVideoX: forcesdivisible_by = 16andadd_one = FalseHunyuan Video: forcesdivisible_by = 16andadd_one = FalseMochi: forcesdivisible_by = 64andadd_one = FalseWan 2.x: forcesdivisible_by = 16andadd_one = FalseCustom: respects the values you set manually
| Model | divisible_by | add_one |
|---|---|---|
| LTX Video / LTX2 | 64 | False |
| CogVideoX | 16 | False |
| Hunyuan Video | 16 | False |
| Mochi | 64 | False |
| Wan 2.x | 16 | False |
MIT License