Nodes/ComfyUI-Desert-Pixel-Nodes/DP Custom Aspect Ratio
ComfyUI Node

DP Custom Aspect Ratio

Set a width and height as a bundled CUSTOM_SETTINGS output

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP Custom Aspect Ratio
    • custom_settings
    width1024
    height1024

    A small helper for one job: pick a width and a height, and pass them downstream as a single bundled setting. Where the rest of Desert Pixel's aspect-ratio tooling gives you a menu of presets (1:1, 16:9, portrait, and so on), this is the escape hatch - the one you use when you want an exact custom dimension that isn't on the preset list.

    The catch, and it's the whole reason to read this before wiring it up: the output type is CUSTOM_SETTINGS, which is a Desert Pixel-specific type, not a plain pair of integers or a latent. That means it plugs into other DP nodes that accept CUSTOM_SETTINGS - not into a vanilla Empty Latent Image, which wants raw width/height ints. If you're living inside the Desert Pixel ecosystem (their loaders and samplers), this slots right in. If you're on a stock ComfyUI graph, this particular node won't connect to your core nodes, and that trips people up.

    The inputs that matter

    There are only two, and they're exactly what you'd expect:

    • width (256–2048, step 8, default 1024)
    • height (256–2048, step 8, default 1024)

    Both snap to multiples of 8, which is the right constraint - diffusion models want dimensions divisible by 8 (SDXL and friends really prefer multiples of 64, but 8 is the hard floor). Set your numbers, and the node emits a single custom_settings output carrying both.

    How to install it

    ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes
    

    then restart ComfyUI. No dependencies, no models. It's under the "DP" utils category.

    Common issues & troubleshooting

    The output won't connect to my Empty Latent Image. Expected - CUSTOM_SETTINGS is a bundled Desert Pixel type, not raw ints. Feed it into a DP node built to consume it. If all you need is a plain width/height for a stock latent, you're better off with a core primitive or a simple integer node than trying to force this one to fit.

    Stuck at a weird resolution. Both dimensions step by 8 and cap at 2048. That's a sane range for a base render - if you need bigger, generate at a supported size here and upscale in a later pass rather than pushing the base resolution past what your checkpoint was trained for. Going way off the model's native resolution is a classic source of duplicated limbs and doubled subjects.

    When to bother. If you're already on Desert Pixel loaders and want one node that says "this exact size," it's tidy. Outside that ecosystem it's an odd fit, and a plain integer pair does the same job with better compatibility. Pick based on which world your graph lives in.

    CategoryDP/utils

    Inputs (2)

    NameTypeDefaultDescription
    widthINT1024256–2048
    heightINT1024256–2048

    Outputs (1)

    NameTypeDescription
    custom_settingsCUSTOM_SETTINGS