Resolution Selector (Advanced)
Pick an aspect, get clean pixel sizes
- width
- height
- ratio
- megapixels
- label
The "(Advanced)" in this node's name is doing real work: it lets you size by edge or by megapixels rather than by brute-force width/height, and it rounds every result to a clean step so the pair is one a diffusion model will actually accept. If you've ever typed 1344×768 into a loader and wondered why it underperforms, this is the node that stops you doing that by hand.
Resolution Selector answers one question - "what width and height match this shape and budget?" - and answers it in the units you actually think in. Pick an aspect ratio, say how you want to size it, and it returns width, height, the ratio it actually achieved, the megapixel area, and a ready-made 1024 x 576, 16:9, 0.59 MP label for your filename.
How to drive it
aspect_ratio- the shape, widest side first. 16:9 widescreen, 3:2 stills, 1:1 square.orientationflips it to portrait;squareignores the ratio entirely.size_by- which measurement you're giving:long edge,short edge,width,height, ormegapixels. 1024 on the long edge of 16:9 gives 1024×576; 1.0 megapixels at 16:9 gives roughly 1344×768.size- the pixel measurement, read by every option butmegapixels(which reads its ownmegapixelsfield instead).multiple_of- the step both sides land on. 8 is the least a latent will take; 64 is what most model families were trained on. Set it to match your checkpoint's native multiple and the pair stays "model-safe."
Why the outputs matter
width and height wire into any loader or latent node that takes dimensions. The quieter outputs are the useful ones for automation: ratio tells you the actual width÷height after rounding (compare it to what you asked for and you'll see when the step forced a slightly different shape), megapixels reports the real area so you can keep two different shapes to the same render budget, and label drops a description into a filename prefix or caption so a render remembers its own settings.
The honest caveats
The tooltip flags the real gotcha: 1024 on the long edge of a 16:9 image is 1024×576, which is only 0.59 MP - noticeably softer than a square 1024×1024. Long, thin images look high-res and aren't. If you're comparing renders across aspect ratios, size by megapixels instead, and keep the megapixels output around so the comparison is apples to apples.
Also remember this gives you a pair, not a loaded model - wire width and height into the empty image or latent you're about to sample, don't expect the resolution to be enforced anywhere else.
Installing
Resolution Selector lives in WAS Node Suite v3. Through ComfyUI Manager, search WAS Node Suite v3 and install; manually:
cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui
Restart ComfyUI. Requirements: ComfyUI 0.14.0+ and Python 3.10+. This node does pure arithmetic, so it's a good introduction to the pack's v3 philosophy: no dependencies, nothing downloaded, no weights. The old v2 WAS suite pulled in a pile of packages and broke on ComfyUI updates; v3 computes on the torch device you already have.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 | The shape, widest side first. 16:9 is widescreen, 3:2 is a stills camera, 1:1 is square. Orientation below decides which way round it is applied, so each shape is listed once. |
| orientation | COMBO | landscape | Which way round the shape goes. `portrait` swaps the two sides, and `square` ignores the ratio entirely. |
| size_by | COMBO | long edge | Which measurement you are giving. `long edge` and `short edge` fix whichever side is longer or shorter; `width` and `height` fix that side whatever the orientation; `megapixels` fixes the area instead and reads the megapixels widget rather than size. |
| size | INT | 10241–16384 | The measurement in pixels, read by every option but `megapixels`. 1024 on the long edge of 16:9 is 1024 by 576. |
| multiple_of | INT | 641–256 | Step both sides land on. 8 is the least a latent will take, and 64 is what most model families were trained on. A step moves a side by up to half of itself, so the shape you get back can differ slightly from the one you asked for; the ratio output says what it came to. |
| megapixelsopt | FLOAT | 1.000.01–64 | The area in millions of pixels, read only when size_by is `megapixels`. 1.0 at 16:9 is about 1344 by 768. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| width | INT | Width in pixels, a whole number of steps. |
| height | INT | Height in pixels, a whole number of steps. |
| ratio | FLOAT | Width divided by height as it came out, after the step was applied. Compare it with the shape you asked for to see what the step cost. |
| megapixels | FLOAT | Area of the pair in millions of pixels, whichever way it was sized. Read it to keep two different shapes to the same cost. |
| label | STRING | The pair written out, as '1024 x 576, 16:9, 0.59 MP'. Feed it to a filename prefix or a caption so a render records its own size. |