Nodes/comfyui_AcademiaSD/Academia SD Resolution Calc ๐Ÿงฎ
ComfyUI Node

Academia SD Resolution Calc ๐Ÿงฎ

Stop hand-typing resolutions โ€” set megapixels and a ratio instead

By AcademiaSDยทCreated about a year agoยทUpdated 4 days agoยท 76
Academia SD Resolution Calc ๐Ÿงฎ
  • image
  • WIDTH
  • HEIGHT
โ—„megapixel1.0โ–บ
โ—„aspect_ratio4:5 (Artistic Frame)โ–บ
โ—„divisible_by16โ–บ
โ—„custom_ratiofalseโ–บ
โ—„custom_aspect_ratio1:1โ–บ

Diffusion models care about the total pixel budget, not the raw width and height. SDXL wants roughly a megapixel; Flux can be pushed toward two; LTX-Video wants specific multiples. Hand-computing "what width gives me 1.5MP at a 3:4 ratio" is the kind of arithmetic that makes you reach for a spreadsheet. The Academia SD Resolution Calc is the node version of that spreadsheet: pick a megapixel target, pick an aspect ratio from a big curated list, and it hands back clean width and height INTs for your Empty Latent node.

How it works

The math is straightforward: megapixel (default 1.0) sets the target area, aspect_ratio (23 presets, from 1:1 up to 32:9 ultrawide) sets the proportions, and the node solves for dimensions - then rounds them to the nearest multiple of divisible_by (8, 16, 32, or 64). You flip custom_ratio and type your own custom_aspect_ratio when the library doesn't have your exotic shape. Outputs are WIDTH and HEIGHT as INTs, ready for an Empty Latent or a sampler resolution input.

The divisibility lock is the reason to trust the node over your own math: tensor dimension errors from non-multiple resolutions are one of the classic "why is my Flux run failing" gotchas, and this bakes the fix in. Default is 16, which covers most architectures; pick 64 for the strict ones.

The inputs that matter

  • megapixel - your pixel budget. 1.0 for SDXL-era, 1.5โ€“2.0 for Flux. The node uses 1024ร—1024 as its definition of a megapixel.
  • aspect_ratio - pick from the list; the names are descriptive ("4:5 (Artistic Frame)").
  • divisible_by - 8/16/32/64 rounding safety.
  • custom_ratio + custom_aspect_ratio - for anything not in the library.

Install

Same pack install: ComfyUI Manager โ†’ search "AcademiaSD", or git clone https://github.com/AcademiaSD/comfyui_AcademiaSD into custom_nodes/, restart. No extra dependencies.

Where it's great, and where it's not

It shines for the "I want to try this workflow at 1.2MP today and 2.0MP tomorrow" workflow - change one number, and the whole resolution updates consistently. Where it falls short of a few rival resolution nodes (like Efficiency Nodes' equivalent): there's no "match the resolution of a reference image" convenience, no auto-fill from a connected image, and the megapixel slider goes up to 100MP, which you will never genuinely want for a diffusion latent. Still, for the plain "what dimensions make this ratio at this budget" question - which is 90% of the actual use - it's a clean, honest calculator, and the LED readout showing your computed dimensions before you queue is a small joy.

CategoryAcademia SD

Inputs (6)

NameTypeDefaultDescription
megapixelFLOAT1.00.1โ€“100โ€”
aspect_ratioCOMBO4:5 (Artistic Frame)23 options: 1:1 (Perfect Square), 2:3 (Classic Portrait), 3:4 (Golden Ratio), 3:5 (Elegant Vertical), 4:5 (Artistic Frame), 5:7 (Balanced Portrait), +17
divisible_byCOMBO164 options: 8, 16, 32, 64
custom_ratioBOOLEANfalseโ€”
custom_aspect_ratioSTRING1:1โ€”
imageoptIMAGEโ€”

Outputs (2)

NameTypeDescription
WIDTHINTโ€”
HEIGHTINTโ€”