Advanced Aspect Ratio
Advanced Aspect Ratio (SKBundle)
- width
- height
- upscale_factor
Advanced Aspect Ratio is a width/height calculator that sits at the front of your graph, before the sampler ever sees a number. Instead of typing 1024 and 1536 into an Empty Latent Image node and hoping you did the math right, you pick a category and let this node hand back clean, correctly-rounded dimensions.
Why you'd reach for it
Getting resolution wrong is one of the more common ways a generation goes bad - go too far off a model's native training resolution and you get duplicated limbs, tiling, or straight-up garbled output. SDXL wants specific trained ratios, Flux wants dimensions divisible by 64, and everyone's typed a width or height by hand at some point that wasn't actually a clean multiple of anything. This node exists to take that arithmetic off your plate: pick a category, get a sane pair of numbers back, and stop guessing whether 1368 is going to cause you a headache three steps later.
How it works
You start with category - Custom, Print, Social Media, Cinema, or Flux - which frames what kind of output you're targeting, and subcategory, a text field that narrows the preset within that category. From there, width and height are your base numbers (default 512×512, adjustable from 32 up to 8192 in steps of 8), swap_dimensions flips them for a quick portrait/landscape toggle without retyping anything, and upscale_factor (0.1 to 4, in 0.05 steps) is a multiplier that rides along as its own output - the idea being you set your base generation size here and feed the same multiplier into a downstream upscale node, rather than typing the target resolution twice and having the two drift out of sync.
The one that actually matters most if you're on Flux: round_to_64. Flux's usable dimensions need to be divisible by 64 - that's not a soft recommendation, it's the model's actual constraint - and this toggle snaps whatever you've dialed in to the nearest valid multiple. It defaults to off, so picking Flux as your category doesn't automatically protect you; you still need to flip this switch yourself.
Inputs and outputs
The settings you'll actually touch are category (what kind of preset you're working from), width / height (your base numbers), and round_to_64 (turn it on for Flux, ignore it for anything with looser constraints). Three outputs: width and height as plain integers, and upscale_factor as a float - wire width/height into your latent or empty-image node, and upscale_factor into whatever upscaler you're chaining afterward.
Installing it
Part of ComfyUI SKBundle, the personal node pack from u/skbphy (GitHub: SKBv0) - built with Cursor AI's help by someone who's been open about not being a professional programmer, with rgthree and mxToolkit cited as the influence. Through ComfyUI Manager, search ComfyUI SKBundle. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/SKBv0/ComfyUI_SKBundle.git
pip install -r requirements.txt
Restart ComfyUI afterward. Nothing to download beyond the pack itself - this is arithmetic, not inference.
Common issues
The one mistake worth calling out twice: round_to_64 is off by default. If you're generating on Flux and you leave it off, you can still end up with a width or height that isn't a valid multiple, even though you picked the "Flux" category - the category label doesn't enforce the constraint on its own. Turn the toggle on whenever you're targeting Flux and let it do the rounding for you.
Past that, remember upscale_factor is a passthrough number, not something this node applies to width/height for you - if you want the scaled resolution as a number, you're expected to feed the factor into your upscale node rather than expecting the base width/height outputs to already reflect it. And because subcategory is a free-text field rather than a fixed dropdown in the schema, don't be surprised if it behaves differently than you expect depending on what the category picker populates it with - when in doubt, drop the node and look at what's actually offered before assuming a preset name.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| category | COMBO | 5 options: Custom, Print, Social Media, Cinema, Flux | |
| subcategory | STRING | Custom | — |
| width | INT | 51232–8192 | — |
| height | INT | 51232–8192 | — |
| swap_dimensions | BOOLEAN | false | — |
| upscale_factor | FLOAT | 1.000.1–4 | — |
| round_to_64 | BOOLEAN | false | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| upscale_factor | FLOAT | — |