Nodes/BV Node Pack/πŸŒ€ BV Empty Latent Random Ratio
ComfyUI Node

πŸŒ€ BV Empty Latent Random Ratio

BV Empty Latent Random Ratio rolls the dice for you

By BlackVortexAIΒ·Created 9 months agoΒ·Updated 3 days agoΒ· 7
πŸŒ€ BV Empty Latent Random Ratio
    • latent
    • width
    • height
    • picked_ratio
    β—„seed0β–Ί
    β—„resolution1024β–Ί
    β—„custom_resolution1024β–Ί
    β—„alignment8β–Ί
    β—„use_1_1trueβ–Ί
    β—„use_3_2trueβ–Ί
    β—„use_2_3trueβ–Ί
    β—„use_4_3trueβ–Ί
    β—„use_3_4trueβ–Ί
    β—„use_16_9trueβ–Ί
    β—„use_9_16trueβ–Ί
    β—„use_21_9trueβ–Ί
    β—„use_9_21trueβ–Ί
    β—„ratiosβ–Ί
    β—„batch_size1β–Ί

    If you run big batch queues for style tests, dataset gen, or "let's see what sticks" exploration, you know the drill: you fix one resolution and every image comes out the same aspect ratio, so composition ideas that only work in landscape never get their shot. BV Empty Latent Random Ratio is the node that fixes that by letting a seed pick the aspect ratio for you - deterministically.

    It's a small utility, but it sits in a surprisingly useful niche. It creates a native empty latent at a randomly chosen aspect ratio while preserving the same total pixel area, which matters more than it sounds: keep the square area constant and the sampler's denoise behavior and VRAM cost stay roughly comparable across all the ratio hops. You get variety without the trade-offs of just jacking resolution up blindly.

    How it works

    You give it a seed (default 0) and it picks from whatever ratios you've enabled with the use_1_1, use_3_2, use_4_3, use_16_9, use_21_9, and their portrait twins. There's also a multiline ratios field for extra ratios beyond the nine built-ins - one per line, like 5:4. The picked ratio is deterministic: same seed, same ratio, every time. That's the part that makes it usable in batch; your queue is reproducible, not chaotic.

    The resolution dropdown (default 1024, with a custom_resolution field when you pick Custom) sets the square reference area, and alignment snaps dimensions to a multiple of 8/16/32/64 - leave it at 8 unless you know why you'd want otherwise. batch_size controls how many latents it produces.

    Outputs are the useful part of this node. You get the latent for your sampler, but also width, height, and picked_ratio as plain values. That's the sleeper feature: wire those into a save node or a text display and your output filenames can record which ratio produced each image. No more guessing from the picture.

    Where it fits

    Drop it wherever you'd normally use Empty Latent Image in a txt2img graph: loader β†’ empty latent β†’ KSampler. Because the ratio is seed-driven, it plays nicely with the workflow where the seed comes from a node like BV Seed or rgthree's Seed - just be aware the same seed value will typically drive both the latent ratio and the sampling, which is usually what you want for reproducibility, but occasionally confusing when a "random" ratio appears to repeat. If you want the ratio to vary while the sampling seed stays fixed, feed it its own seed source.

    Install

    Search BV Node Pack in ComfyUI Manager, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/BlackVortexAI/bv_nodepack.git
    

    Restart and hard-refresh with Ctrl + F5. No extra Python dependencies, no model files - this one is pure core-ComfyUI latent creation, so there's not much that can break. If the dropdown list ever looks off after an update, the stale-frontend refresh is the usual fix.

    The one thing to know

    There's a deprecated sibling node, BV Latent Random Aspect Ratio, kept around for old workflows. It resizes an existing latent instead of making one fresh. If you're starting a new workflow, use this one - the fresh-latent version is what the pack's example workflow uses, and it's the path that's actually maintained.

    CategoryπŸŒ€ BV Node Pack/latent

    Inputs (15)

    NameTypeDefaultDescription
    seedINT00–18446744073709550000β€”
    resolutionCOMBO10246 options: 512, 768, 1024, 1536, 2048, Custom
    custom_resolutionINT102464–16384β€”
    alignmentCOMBO84 options: 8, 16, 32, 64
    use_1_1BOOLEANtrueβ€”
    use_3_2BOOLEANtrueβ€”
    use_2_3BOOLEANtrueβ€”
    use_4_3BOOLEANtrueβ€”
    use_3_4BOOLEANtrueβ€”
    use_16_9BOOLEANtrueβ€”
    use_9_16BOOLEANtrueβ€”
    use_21_9BOOLEANtrueβ€”
    use_9_21BOOLEANtrueβ€”
    ratiosSTRINGβ€”
    batch_sizeINT11–4096β€”

    Outputs (4)

    NameTypeDescription
    latentLATENTβ€”
    widthINTβ€”
    heightINTβ€”
    picked_ratioSTRINGβ€”