Nodes/ComfyUI Essentials/πŸ”§ Empty Latent Size Picker
ComfyUI Node Runs on cloud

πŸ”§ Empty Latent Size Picker

Empty Latent Size Picker (ComfyUI Essentials)

By cubiqΒ·Created 3 years agoΒ·Updated about a year agoΒ· 1,155
πŸ”§ Empty Latent Size Picker
    • LATENT
    • width
    • height
    β—„resolution1024x1024 (1.0)β–Ί
    β—„batch_size1β–Ί
    β—„width_override0β–Ί
    β—„height_override0β–Ί

    Stop typing resolutions and stop getting double heads. This node is a dropdown of SDXL's known-good aspect ratios that spits out an empty latent at the size you pick, plus the width and height as numbers. If you've ever generated a stretched, two-headed mess because you asked SDXL for 1920Γ—1080 directly, this node is the fix - it only offers sizes the model was actually trained on.

    Why you'd reach for it

    Every architecture has native resolutions it was trained on, and going off them produces artifacts - elongated bodies, duplicated heads, repeated patterns. SDXL in particular has a specific set of trained buckets (1024Γ—1024, 1152Γ—896, 1216Γ—832, and so on). Remembering them is annoying; guessing is worse. Empty Latent Size Picker turns that knowledge into a menu: choose a ratio, get a correctly-sized empty latent to start your generation from. It also hands you the width and height as integers so the rest of your graph (upscale targets, paste-back math) stays consistent with what you picked.

    How it works

    You select from the resolution dropdown - each entry is a trained SDXL size labeled with its aspect ratio, like 1024x1024 (1.0) or 832x1216 (0.68). The node builds an empty latent of that size (times batch_size) and outputs it, along with the matching width/height. If you need a size that isn't in the list, the width_override and height_override inputs let you force custom dimensions (they snap to multiples of 8), so the node doubles as a general empty-latent maker when you want to step outside the presets.

    Inputs and outputs

    The one you'll use: resolution (the preset menu, default 1024x1024 (1.0)). Plus batch_size for how many latents to make, and width_override / height_override (set them above 0 to bypass the preset). Outputs are LATENT (feed it into your sampler) and width / height as integers (feed those into whatever downstream node needs to know the size).

    Installing it

    Comes with ComfyUI Essentials by cubiq (Matteo Spinelli, the IPAdapter node author). ComfyUI Manager: search ComfyUI Essentials, install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/cubiq/ComfyUI_essentials
    

    then restart. It's πŸ”§ Empty Latent Size Picker under essentials/utilities, class SDXLEmptyLatentSizePicker+. Maintenance-only pack since April 2025.

    Common issues

    The name says SDXL, and that matters: the presets are SDXL's trained ratios. They're a fine starting point for SDXL-derived models (Illustrious, Pony, and friends all share the 1024 framework), but they are not the right native sizes for SD 1.5 (512-based) or necessarily for Flux and newer models, which want their own resolutions (Flux likes divisible-by-64). For those, use the overrides with the correct dimensions, or a model-appropriate latent node. Second, the presets are for the first generation - plan to upscale afterward rather than generating huge directly; SDXL still degrades if you push a single pass far past its trained band.

    Categoryessentials/utilities

    Inputs (4)

    NameTypeDefaultDescription
    resolutionCOMBO1024x1024 (1.0)26 options: 704x1408 (0.5), 704x1344 (0.52), 768x1344 (0.57), 768x1280 (0.6), 832x1216 (0.68), 832x1152 (0.72), +20
    batch_sizeINT11–4096β€”
    width_overrideINT00–16384β€”
    height_overrideINT00–16384β€”

    Outputs (3)

    NameTypeDescription
    LATENTLATENTβ€”
    widthINTβ€”
    heightINTβ€”