Nodes/ComfyUI_Nimbus-Pack/Aspect Ratio Popular
ComfyUI Node

Aspect Ratio Popular

Pick a screen preset, get width, height and an empty latent

By sergekatzmann·Created 3 years ago·Updated 7 months ago· 7
Aspect Ratio Popular
    • width
    • height
    • upscale_factor
    • prescale_factor
    • batch_size
    • empty_latent
    • show_help
    screen_resolution
    swap_dimensions
    upscale_factor1.0
    prescale_factor1.0
    batch_size1

    You want a 4K wallpaper, or a 1080p frame, and you don't feel like remembering that "4K UHD" is 3840x2160. That's the whole job here. Pick a label from a dropdown - Full HD (1080p), 2K (QHD), 4K (UHD), 8K, plus a pile of laptop and phone panels - and the node hands you the matching width and height as integers, already wired to drop into the rest of your graph. In the ComfyUI menu it shows up as Aspect Ratio Popular, under Nimbus-Pack/Utils.

    It's a convenience node, and that's fine. Half of building workflows is not typing numbers by hand.

    How it works

    It's a lookup table with some passthrough plumbing bolted on. You choose one of the 12 presets in screen_resolution, and the node emits the exact pixel dimensions for it. The nice touch is that it doesn't stop at two integers - it also builds an empty_latent sized to your choice, so you can skip the separate Empty Latent Image node entirely and run this straight into a KSampler.

    The scale knobs follow the usual convention for these preset nodes: prescale_factor scales the generation size (multiply your latent dimensions down or up before rendering), and upscale_factor is passed through untouched so a later upscale stage can read it. Both are handed back out as outputs so you can carry them down the wire.

    The inputs and outputs that matter

    • screen_resolution - the preset. This is the one you actually touch.
    • swap_dimensions (Off/On) - flips width and height, i.e. landscape into portrait.
    • batch_size - baked into the empty_latent so you get N images in one run.

    prescale_factor and upscale_factor (both floats, 0.1–10) are there for scaling math and default to 1, so ignore them until you need them.

    Outputs: width and height (INT) for anything that wants raw dimensions, empty_latent (LATENT) straight into your sampler, plus upscale_factor, prescale_factor, batch_size passed through and a show_help string.

    Installing it

    In ComfyUI Manager, open "Install Custom Nodes" and search ComfyUI_Nimbus-Pack, install, restart. It's a small, low-profile pack, so if the registry doesn't list it, clone it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/sergekatzmann/ComfyUI_Nimbus-Pack.git
    pip install -r ComfyUI_Nimbus-Pack/requirements.txt
    

    Then restart. This node is pure Python - no models, no heavy deps. The requirements.txt mostly exists for the pack's video node, and running it is harmless.

    Common issues & troubleshooting

    The big one: these are screen resolutions, not model resolutions. This is the trap that eats beginners. Diffusion models have a native resolution they were trained at - 1024x1024 for SDXL and Flux, 512 for SD 1.5 - and generating far above it gives you duplicated heads, stretched bodies and tiled patterns. As the most-repeated line on this in the community puts it, you're "using a model trained on 1024x1024 images trying to make images with ridiculously different aspect ratios." Feed 3840x2160 straight into an SDXL latent and you'll see exactly that.

    The correct pattern is a two-stage one: use prescale_factor to bring the generation size down near native (roughly 1 megapixel), render there, then upscale to the 4K/8K target with an ESRGAN model or a tiled upscaler. The upscale_factor output is there precisely so a later node knows how far to scale up.

    Manager doesn't find it. Niche pack - clone it manually with the commands above.

    Portrait came out landscape. Flip swap_dimensions to On; most of these panels are listed landscape-first.

    CategoryNimbus-Pack/Utils

    Inputs (5)

    NameTypeDefaultDescription
    screen_resolutionCOMBO12 options: Full HD (1080p) - 1920x1080, 2K (QHD) - 2560x1440, 4K (UHD) - 3840x2160, 8K (UHD) - 7680x4320, iPhone 12/13/14 Pro Max - 1284x2778, Samsung Galaxy S22 Ultra - 1440x3088, +6
    swap_dimensionsCOMBO2 options: Off, On
    upscale_factorFLOAT1.00.1–10
    prescale_factorFLOAT1.00.1–10
    batch_sizeINT11–64

    Outputs (7)

    NameTypeDescription
    widthINT
    heightINT
    upscale_factorFLOAT
    prescale_factorFLOAT
    batch_sizeINT
    empty_latentLATENT
    show_helpSTRING