A unified ComfyUI custom node that combines model-specific video resolution presets with smart image and mask resizing.
It merges the functionality of FindPerfectResolution and WanResolutions into a single node, making it easy to pick the right resolution for Wan 2.2, MiniMax H3, and LTX video generation while also resizing the input image(s) and mask to match.
- Model selection: Wan 2.2, MiniMax H3, LTX
- Aspect-ratio driven resolution presets for each model
- Resolution quality tiers: Fast Draft, Preview, High Detail, Native (and model-specific labels)
- Optional image inputs for I2V/FL2V/SVI workflows:
image— main input imageimage2— secondary image, resized to the same resolutionmask— optional mask, resized with the same geometry
- Smart resize options: upscale, upscale method, small-image crop/pad, pad color
- Divisibility control: default
16for Wan 2.2,32for MiniMax H3 / LTX - Outputs
width,height, resizedIMAGE,IMAGE2,MASK, and aresolution_infostring
Clone this repository into your ComfyUI custom_nodes folder:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/huchukato/ComfyUI-PerfectVideoResolution.gitRestart ComfyUI.
- Add the node Perfect Video Resolution from the
utilscategory. - Select the
model,aspect_ratio, andresolution. - Optionally connect
image,image2, and/ormask. - Connect
widthandheightto your video sampler / latent generator. - Use the resized
IMAGE,IMAGE2, andMASKoutputs as needed.
When an image is connected, the node automatically picks the closest supported aspect ratio and resizes everything to the selected resolution.
| Name | Type | Description |
|---|---|---|
model |
COMBO | Video model: WAN 2.2, MiniMax H3, LTX |
aspect_ratio |
COMBO | Aspect ratio presets, depends on selected model |
resolution |
COMBO | Resolution quality tier, depends on model + aspect ratio |
image |
IMAGE | Optional input image (I2V/FL2V/SVI) |
image2 |
IMAGE | Optional secondary image, resized to same resolution |
mask |
MASK | Optional mask, resized with same geometry |
divisible_by |
INT | Pixel alignment (default 16 for WAN, 32 for MMH3/LTX) |
upscale |
BOOLEAN | Allow upscaling when target is larger than source |
upscale_method |
COMBO | lanczos, bilinear, bicubic, nearest |
small_image_mode |
COMBO | none, crop, pad |
pad_color |
STRING | Background color for pad mode (default #000000) |
| Name | Type | Description |
|---|---|---|
width |
INT | Calculated width |
height |
INT | Calculated height |
IMAGE |
IMAGE | Resized image |
IMAGE2 |
IMAGE | Resized secondary image (placeholder if not connected) |
MASK |
MASK | Resized mask (placeholder if not connected) |
resolution_info |
STRING | Human readable resolution summary |
Built by combining ideas from: