Nodes/saya-comfy-couple-plus/Saya Resolution Scale Calculator · Existing + Added Ratios
ComfyUI Node

Saya Resolution Scale Calculator · Existing + Added Ratios

Pick it from a ladder that was built to be divisible

By alphaziod·Created 3 months ago·Updated about 15 hours ago· 3
Saya Resolution Scale Calculator · Existing + Added Ratios
  • image
  • width_int
  • height_int
  • width_float
  • height_float
resolution_presetLandscape 16:9 · 1344x768
no_scalefalse
scale_from_imagefalse
aspect_preset_when_not_image16:9 - Landscape
swap_aspect_when_not_imagefalse
custom_aspect_width16
custom_aspect_height9
modeWAN/LTX (Div32)
custom_divisor8

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 - mode is 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 expect scale_from_image to 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.

CategorySaya/Scaling

Inputs (10)

NameTypeDefaultDescription
resolution_presetCOMBOLandscape 16:9 · 1344x76829 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_scaleBOOLEANfalse
scale_from_imageBOOLEANfalse
aspect_preset_when_not_imageCOMBO16:9 - Landscape14 options: 1:1 - Square, 4:5 - Portrait, 3:4 - Portrait, 7:9 - Portrait, 2:3 - Portrait, 9:16 - Portrait, +8
swap_aspect_when_not_imageBOOLEANfalse
custom_aspect_widthINT161–9999
custom_aspect_heightINT91–9999
modeCOMBOWAN/LTX (Div32)3 options: WAN/LTX (Div32), FLUX/SDXL (Div8), Custom Divisor
custom_divisorINT81–512
imageoptIMAGE

Outputs (4)

NameTypeDescription
width_intINT
height_intINT
width_floatFLOAT
height_floatFLOAT