ComfyUI Node

Resolution Machine

Stop guessing the right pixel size for your model

By SatadalAI·Created about a year ago·Updated 11 days ago· 3
Resolution Machine
    • width
    • height
    modelSD 1.5 Family
    dimension
    resolution
    custom_width512
    custom_height512
    megapixelNone

    Every model has a sweet spot

    Each model family has a resolution it was trained at and a range where it actually behaves. SD 1.5 wants 512-ish, SDXL wants 1024-ish, FLUX wants 1024–1536, video models want specific aspect ratios. Type a width and height by hand and you risk feeding the model something outside its training distribution - which is exactly how you get doubled anatomy, tiled patterns and "why does this look worse at higher res?". Resolution Machine turns that guess into a dropdown.

    How it works

    Under the hood it's a lookup into the pack's resolutions.json - a curated table mapping model family → resolution tier → dimension → exact pixel size. Pick the model family (SD 1.5, SDXL, FLUX, SD3, Z-Image, Qwen-Image, Hunyuan-DiT, video models like Wan and LTX, and more), pick a dimension (Square, Portrait, Landscape), pick a preset like "Balanced Landscape (19:13) 1216x832" - and the node returns width and height as INTs. Wire those into an Empty Latent Image or any size-parameterized node.

    The megapixel dropdown is the clever part. Instead of hunting for exact dimensions, pick a target like 1.0MP or 2.0MP and the node preserves your chosen aspect ratio while solving for width × height ≈ that megapixel count, rounding both to the nearest multiple of 8. That rounding isn't pedantry: latent-space sizes that aren't aligned to the UNet's internal constraints are where the weird artifacts start, and "nearest multiple of 8" is the alignment rule the community has landed on. Set the resolution to "Custom" and it uses your custom_width / custom_height values instead.

    The inputs that matter

    • model - the single most important field. The preset list only makes sense relative to the family you're actually generating with.
    • dimension + resolution - the two dropdowns that pick the exact preset.
    • megapixel - optional. Set it to target a total pixel budget and let the aspect ratio drive the exact size.
    • custom_width / custom_height - used when resolution is "Custom".

    Outputs are two INTs, width and height. The pack's Latent Machine has the same presets built in, so the two nodes share one mental model: pick a family, pick a shape, get aligned dimensions.

    Where it earns its keep

    If you only ever generate 1024×1024 on SDXL, this node is overkill - you don't need a dropdown for one number. It starts paying for itself the moment you juggle multiple model families or batch video work: switching from an SDXL character workflow to a Wan video one becomes a three-dropdown change instead of a math problem. The megapixel mode is also the honest answer to "what size do I need for a big print?" - pick 4.0MP, keep your aspect ratio, let the node do the modular arithmetic.

    Install & gotchas

    Standard pack install - ComfyUI Manager search "SATA UtilityNode", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SatadalAI/SATA_UtilityNode
    

    then restart. No models to download; the resolution table ships inside the pack.

    One known behavior to expect: if you pick a preset and then switch models, the resolution can "stick" at the old value. That's a deliberate fallback, not a crash - the node logs a warning and uses your custom values when the selected preset isn't valid for the newly selected family. The fix is simply to re-pick the resolution after switching models.

    CategorySATA_UtilityNode

    Inputs (6)

    NameTypeDefaultDescription
    modelCOMBOSD 1.5 Family11 options: SD 1.5 Family, SDXL Family (Pony, Juggernaut), FLUX Family (FLUX.1, FLUX.2), SD3 Family (SD3, SD3.5), Z-Image Family, Hunyuan-DiT, +5
    dimensionCOMBO3 options: Square, Portrait, Landscape
    resolutionCOMBO63 options: Balanced Landscape (19:13) 1216x832, Balanced Landscape (9:7) 1440x1120, Balanced Landscape (9:7) 1728x1344, Balanced Portrait (13:19) 832x1216, Balanced Portrait (7:9) 1120x1440, Balanced Portrait (7:9) 1344x1728, +57
    custom_widthINT5121–8192
    custom_heightINT5121–8192
    megapixelCOMBONone6 options: None, 0.5MP, 1.0MP, 1.5MP, 2.0MP, 4.0MP

    Outputs (2)

    NameTypeDescription
    widthINT
    heightINT