Video Resolution Selector 🎬
Stop guessing Wan video resolutions — this node just hands you the right numbers
- width
- height
Some ComfyUI nodes are 400 lines of clever; this one is a lookup table with dropdowns bolted on top. And honestly? It's useful. If you've ever built a Wan workflow by copy-pasting a resolution out of a forum post and hoping, this is the node that ends that. Pick three options, get a width and height, wire them in, move on.
It's from if-ai, the ImpactFrames channel behind IF_AI_tools, and it's about as lightweight as custom nodes get: no models, no API, no key, no requirements.txt. It doesn't generate, resize, or animate a single pixel. It just saves you from typing 1280×720 wrong.
Why this exists at all
Wan is picky about resolution. The community's default buckets are 1280×720 (720p) and 832×480 (480p) for image-to-video, 624×624 when you want a squarish frame, and video models fall apart if you wander off the sizes they were trained around. Add Wan's 3D causal VAE wanting dimensions aligned to its stride, plus the mask-divisibility constraint radial attention imposes, and off-bucket sizes can mean artifacts, slowdowns, or videos that just look wrong and you can't say why.
That's the whole job here. The node holds the blessed resolution table so you don't have to.
How it works
VideoResolutionSelector is a pure lookup. mode + aspect_ratio + quality index into a hardcoded dictionary, and the node returns two INTs: width and height. Wire those into anything that takes an integer dimension - the README's target is KJNodes' Image Resize node, but any resize/preview node works. The mechanism is honestly the whole story; there's no hidden math until you flip on the radial attention option (more below).
A real nicety: the front-end JS dynamically filters the aspect_ratio dropdown to the options that exist for your chosen mode. Switch from QWEN to I2V720p and the eleven orientations shrink to the three that are real. If a stale workflow sneaks a bad combo through anyway, it falls back through a sensible mapping - Cinematic→Horizontal, Square→Squarish, UltraTall→Vertical - prints a warning to the console, and bottoms out at 832×480 rather than erroring.
The inputs that matter
Three required, that's it:
- mode - I2V720p / I2V480p (Wan image-to-video, the two standard tiers), T2V14B / T2V1.3B (text-to-video), IMG (Wan's surprisingly good single-frame image mode, up to 1600×900), KONTEXT (Flux Kontext, with its tall portrait-style buckets), and QWEN (the Qwen image/video line - the only mode with the full orientation set).
- aspect_ratio - really an orientation list: Horizontal, Vertical, Squarish, plus the extra shapes for IMG and QWEN. The label is a slight misnomer; think of it as "which way is the frame."
- quality - HQ/MQ/LQ. These are resolution tiers, not quality filters: HQ is full 720p, MQ drops to 832×480, LQ is the oddball 704×544 - fine for previews, not finals. Squarish buckets are the same 624×624 across all three tiers, so if you're square, the dropdowns mostly don't matter.
Outputs: width and height, both INT. That's the entire output surface.
The radial attention option
The optional enable_radial_attention toggle is for a specific crowd: people running the radial-attention speed trick from Kijai's WanVideoWrapper. Radial attention (from MIT's mit-han-lab) is sparse attention: a few normal "dense" steps, then fast-and-approximate ones, trading some quality for a real speedup. The catch is that its masking wants the per-frame patch count to divide evenly by a block size (64 or 128 here), and stock resolutions like 624×624 don't always qualify.
Flip it on and the node recomputes the resolution to fit - radial_mode (upscale / downscale / closest) picks the nudge direction, block_size the granularity. Niche within a niche: leave it off unless you actually run radial attention.
Installing it
ComfyUI Manager is the easy path - search "WanResolutionSelector" (or "Video Resolution Selector") and install. Otherwise:
cd ComfyUI/custom_nodes
git clone https://github.com/if-ai/ComfyUI-WanResolutionSelector
Then restart ComfyUI and find it under ImpactFrames💥🎞️/utils (search "video resolution" in the node menu). No pip install, no models to download. The Wan checkpoints it steers you toward are the real download: a 14B fp8 is a 14GB+ pull, fp16 double that - don't blame this node for those.
Where people get tripped up
- The node "doesn't do anything." Right - it only outputs numbers. If you expected it to resize your image, you're missing the resize node downstream; wire
width/heightinto KJNodes Image Resize. - Console warning about aspect ratio. You've got a combo that doesn't exist for the mode (or a saved workflow from before the dropdown filtering). It falls back gracefully, but pick a valid orientation to silence it.
- Node missing after install. Restart ComfyUI, and make sure the folder name inside
custom_nodesis exactlyComfyUI-WanResolutionSelector.
Small, dumb, and worth having. Install it once, forget it's there, and let it be the reason you stop second-guessing whether your Wan workflow is at the resolution it thinks it is.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| mode | COMBO | I2V720p | Generation mode |
| aspect_ratio | COMBO | Horizontal | Aspect ratio (some options may not be available for all modes) |
| quality | COMBO | HQ | 3 options: HQ, MQ, LQ |
| enable_radial_attentionopt | BOOLEAN | false | Enable radial attention compatibility |
| radial_modeopt | COMBO | upscale | How to adjust resolutions for radial attention |
| block_sizeopt | COMBO | 128 | Radial attention block size |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |