Nodes/ComfyUI-MaxedOut/Empty Latent Image MXD
ComfyUI Node

Empty Latent Image MXD

Pick an aspect ratio and be done

By Maxed-Out-99·Created about a year ago·Updated 29 days ago· 9
Empty Latent Image MXD
    • LATENT
    aspect_ratioSquare (1:1)
    megapixels1.0
    verticalfalse
    batch_size1
    multiple8

    The core Empty Latent Image node makes you type width and height, which means you retype the same five resolutions for every workflow you build. Empty Latent Image MXD replaces the arithmetic with two knobs that actually describe what you want: aspect ratio and megapixels. Pick "Widescreen (16:9)", say 1 megapixel, flip vertical if you're feeling it, and the node hands you a properly-sized empty latent batch. It's the same model-agnostic, standard 4-channel latent as core - nothing model-specific here, no surprise dependencies.

    How it works

    The math is the same as ComfyUI's own Resolution Selector: total_pixels = megapixels × 1024², then scale that against the chosen ratio's width/height proportions, and round the result to a clean multiple. The multiple control defaults to 8, which keeps dimensions latent-friendly - the actual tensor is [batch, 4, height/8, width/8], because a standard VAE downsamples 8x. The vertical toggle just swaps the resulting width and height, so you don't need separate portrait/landscape entries cluttering the list. Five ratios ship in the dropdown: Square (1:1), Standard (4:3), Landscape (3:2), Widescreen (16:9) and Ultrawide (21:9).

    Inputs that matter

    • aspect_ratio - the five presets above. Defaults to Square (1:1).
    • megapixels - target total, default 1.0 (≈1024×1024 square). Range 0.1–16.
    • vertical - swaps width and height for portrait orientation.
    • batch_size - how many latent images in the batch, 1 to 4096.
    • multiple (optional) - rounding step, default 8. The tooltip's advice is the rule: keep it a multiple of 8 for clean latent dimensions.

    Wiring it in

    The single LATENT output feeds a KSampler exactly like the core empty latent does - it's a drop-in for any graph that starts from a blank latent. The resolution preset + vertical toggle is the whole selling point: it exists because the author got tired of retyping sizes across SDXL, Flux and WAN workflows. There's also a pure-computation sibling, Resolution Selector MXD, that outputs the width and height as integers instead of the latent itself, if you want the numbers for something else.

    Installing

    ComfyUI Manager → search "Maxed Out" → install, restart. Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Maxed-Out-99/ComfyUI-MaxedOut.git
    

    No pip dependencies, no model files.

    Common issues

    Keep an eye on the megapixel number, not the aspect ratio: at 1.0 MP a 21:9 frame is wide but short, and at 16 MP you may be asking your sampler for more than your card can chew - the node won't warn you. And remember the multiple rounding, so two ratios can land on the same actual dimensions at small sizes; if you need exact pixel counts, use the integer-output resolution selector instead.

    CategoryMXD/Latent

    Inputs (5)

    NameTypeDefaultDescription
    aspect_ratioCOMBOSquare (1:1)5 options: Square (1:1), Standard (4:3), Landscape (3:2), Widescreen (16:9), Ultrawide (21:9)
    megapixelsFLOAT1.00.1–16Target total megapixels. 1.0 MP ≈ 1024x1024 for square.
    verticalBOOLEANfalse
    batch_sizeINT11–4096The number of latent images in the batch.
    multipleoptINT88–128Round the calculated resolution to the nearest multiple of this value. Keep a multiple of 8 for clean latent dimensions.

    Outputs (1)

    NameTypeDescription
    LATENTLATENTThe empty latent image batch.