Nodes/Comfyui-ergouzi-Nodes/2🐕Proportional empty Latent
ComfyUI Node

2🐕Proportional empty Latent

An empty latent that already knows your aspect ratio

By 11dogzi·Created 2 years ago·Updated 2 years ago· 102
2🐕Proportional empty Latent
    • LATENT
    • width
    • height
    width512
    height512
    ratio1:1
    batch_size1
    equal_scalefalse

    Every workflow starts somewhere, and for most of them that's an empty latent sized to whatever resolution you're generating at. The stock ComfyUI node makes you type width and height by hand and work out the numbers yourself for whatever ratio you actually want. Proportional empty Latent wraps a shortcut around that: pick a ratio from a dropdown, and it does the math for you.

    How it works

    You set a base width and height (default 512×512, stepping by 8 like any latent) and a ratio - one of 1:1, 3:2, 16:9, 2:3, 9:16. Flip equal_scale on and it recalculates both dimensions so the resulting canvas keeps roughly the same total pixel budget across ratios, instead of just applying the ratio literally to your base numbers - the point being that switching from square to widescreen shouldn't quietly double your VRAM use and generation time just because you changed the shape. Leave it off for a more literal application of the ratio. batch_size is the usual batch count (up to 4096, though your GPU will have opinions long before that).

    Outputs that matter

    You get the LATENT itself, plus width and height as separate INT outputs. That's the actual reason to reach for this over the stock node once it's wired in: instead of hardcoding "1024" in three different places - the empty latent, an upscale node, a save/resize step - you route this node's width/height outputs everywhere those numbers are needed. Change the ratio once and everything downstream follows, instead of you hunting for the second and third place you typed the same number.

    Installing it

    ComfyUI Manager: search "Comfyui-ergouzi-Nodes", install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/11dogzi/Comfyui-ergouzi-Nodes.git
    

    then restart. Pure math node - no models, no heavy dependencies. Worth flagging: this English repo is the frozen branch of the pack. The author's actively maintained version lives in a separate, Chinese-first sibling repo, so what you're installing here is stable but isn't where new features are landing.

    Common issues & troubleshooting

    The one thing that actually catches people is equal_scale. If you toggle it on expecting the exact numbers from some other tool's fixed resolution table - say, a list of SDXL-trained bucket sizes - you might get close but not identical values. This node computes from your base width/height and the chosen ratio; it isn't reading a lookup table of known-good resolutions for a specific model. If your checkpoint is picky about being fed one of its trained resolutions exactly (SDXL is the classic example), check what actually lands in the width/height outputs before trusting them, or just set your own known-good numbers as the base and leave equal_scale off.

    Beyond that it's about as failure-proof as a node gets - no external state, no file it needs to find, nothing that depends on anything outside the four numbers you gave it.

    Category2🐕/🤿Latent

    Inputs (5)

    NameTypeDefaultDescription
    widthINT51216–4096
    heightINT51216–4096
    ratioCOMBO1:15 options: 1:1, 3:2, 16:9, 2:3, 9:16
    batch_sizeINT11–4096
    equal_scaleBOOLEANfalse

    Outputs (3)

    NameTypeDescription
    LATENTLATENT
    widthINT
    heightINT