Saya Resolution Scale Calculator · Existing + Added Ratios
Pick it from a ladder that was built to be divisible
- image
- width_int
- height_int
- width_float
- height_float
Resolution math is where ComfyUI beginners lose an afternoon for no good reason. You want a nice landscape canvas, you type 1344×768 into an Empty Latent node, and it works - until the resolution needs to come from somewhere else, or a model refuses dims that don't divide cleanly. SayaResolutionScaleCalculator is the author's answer: a dropdown of 29 hand-picked, exact generation sizes, with the dimensions handed out as both integers and floats, ready to wire into whatever expects them.
The preset ladder is the heart of it. Clean labels - Landscape 16:9 · 1344x768, Portrait 2:3 · 832x1216, Square · 1024x1024 - and every single one is an AI-friendly size: divisible, no random CivitAI weirdness, no "Ultra Scene" marketing names. The author's own description brags exactly that: "Exact Saya presets only: clean labels, AI-friendly divisible sizes, exact dimensions for generation." You pick a preset and the node returns its dimensions verbatim. That's the primary behavior and it's worth stating plainly: for everything in the dropdown, what you select is exactly what you get out.
A few toggles change that story, and the names tell you what they're for:
- no_scale - flip it on and it ignores the preset, outputting the source dimensions instead. If an image is connected, that's the image's own width/height; otherwise a 1024×1024 fallback.
- swap_aspect_when_not_image - flips width and height. Selecting a landscape preset with this on gives you the same ladder in portrait. It also flips whatever aspect logic is running when there's no image.
- scale_from_image, aspect_preset_when_not_image, custom_aspect_*, mode, custom_divisor - this is the "dynamic" path for megapixel-style targets: take an aspect (from the connected image, an aspect preset, or your custom ratio), compute a ~1MP footprint, then snap to a divisor. And here's the honest catch that saves you from flipping switches and seeing nothing change: in the current build, every preset in the dropdown is a fixed size, and the fixed presets return their dimensions verbatim before that dynamic math ever runs. The aspect/mode machinery is real -
modeis where you tell it whether you're snapping for a WAN/LTX-style backbone (multiples of 32) or FLUX/SDXL (multiples of 8) - but it only kicks in for a preset that represents a budget rather than fixed dims. Don't expectscale_from_imageto reshape a fixed preset; it explicitly can't.
Outputs are width_int, height_int, width_float, height_float - both flavors of the same two numbers. The ints go into Empty Latent, latent upscale sizing, or any INT port; the floats exist for the nodes in this ecosystem that want float dimensions (scaling math, some upscale-factor plumbing). Having both saves you an int-to-float conversion node.
When would you reach for it? Whenever a graph needs one canonical generation resolution feeding several places - base pass, hires pass, mask construction. Pick Landscape 16:9 · 1344x768 once, fan the ints out, and the whole graph agrees without you re-typing the number in four spots. It pairs naturally with the rest of the Saya/Scaling family, which handle the later, bigger targets (that near-4K endgame is its own calculator's job, not this one's).
Install: ComfyUI Manager → search saya-comfy-couple-plus, or
cd ComfyUI/custom_nodes
git clone https://github.com/alphaziod/saya-comfy-couple-plus
restart, done - deps are only numpy/Pillow, nothing downloads. It's a resolution picker, not a sampler or upscaler; its job is to make the "what resolution is this whole workflow running at" question have one clean answer.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution_preset | COMBO | Landscape 16:9 · 1344x768 | 29 options: Landscape 16:9 · 768x432, Landscape 16:9 · 896x512, Landscape 16:9 · 1024x576, Landscape 16:9 · 1152x648, Landscape 16:9 · 1280x720, Landscape 16:9 · 1344x768, +23 |
| no_scale | BOOLEAN | false | — |
| scale_from_image | BOOLEAN | false | — |
| aspect_preset_when_not_image | COMBO | 16:9 - Landscape | 14 options: 1:1 - Square, 4:5 - Portrait, 3:4 - Portrait, 7:9 - Portrait, 2:3 - Portrait, 9:16 - Portrait, +8 |
| swap_aspect_when_not_image | BOOLEAN | false | — |
| custom_aspect_width | INT | 161–9999 | — |
| custom_aspect_height | INT | 91–9999 | — |
| mode | COMBO | WAN/LTX (Div32) | 3 options: WAN/LTX (Div32), FLUX/SDXL (Div8), Custom Divisor |
| custom_divisor | INT | 81–512 | — |
| imageopt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width_int | INT | — |
| height_int | INT | — |
| width_float | FLOAT | — |
| height_float | FLOAT | — |