Nodes/koo-nodes-pack/KoO.Resolution
ComfyUI Node

KoO.Resolution

One Node for Size, Ratio and an Empty Latent — With a Flux 2 Mode That's Not Like the Others

By kooailab·Created 15 days ago·Updated 4 days ago· 0
KoO.Resolution
    • width
    • height
    • resolution_label
    • latent
    ◄resolution_preset1024x1024►
    ◄custom_width1024►
    ◄custom_height1024►
    ◄aspect_ratio1:1►
    ◄upscale_multiplier1x►
    ◄batch_size1►
    ◄latent_modeResolution Only►

    The core Empty Latent Image node does one thing: width, height, batch, out comes a latent. Which means every workflow that cares about aspect ratio grows a little scaffolding around it - a preset dropdown here, a manual ratio calculation there, a second node for the 2× version. KoO.Resolution folds that into a single controller: pick a preset or a ratio, set a base size, choose x1 or x2, choose which kind of latent you need, and it hands you both the integers and the tensor.

    If you've ever typed 1344×768 into three different nodes and then changed your mind, this is the node that removes two of them.

    What it does

    Seven widgets:

    • resolution_preset - sixteen stored presets from 512×512 up to 3840×2160, including portrait and 9:16 entries. Old workflows store this, hence the tooltip: "Stored preset value for old workflow compatibility."
    • custom_width / custom_height - the base size, before the multiplier. Min 64, step 8.
    • aspect_ratio - 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9, 4:5, or Custom.
    • upscale_multiplier - 1x or 2x, explicitly non-cumulative: it doubles the base, it doesn't double whatever you had last run.
    • batch_size - latent batch, up to 4096 if you're feeling brave.
    • latent_mode - the interesting one.

    Outputs: width, height, resolution_label (a string like 1536 x 864 | 16:9 | 1.33 MP | Batch 1), and latent.

    The latent_mode trap, and it's a real one

    latent_mode decides the channel count and the spatial downscale of the empty tensor it builds, and the three non-trivial options are not interchangeable:

    • Resolution Only - doesn't build a real latent at all. It emits a 1×4×1×1 placeholder with a downscale_ratio_spacial hint. Use it when you only want the numbers in a graph where something else creates the latent.
    • Standard SD / SDXL - 4 channels, /8. The classic.
    • SD3 / Flux 1 / Qwen Image - 16 channels, /8.
    • Flux 2 - 128 channels, /16.

    That last one is the one to read twice. Flux 2's VAE is a much wider, more compressed latent than the Flux 1 lineage, so a Flux 2 empty latent is a different shape entirely, not just a different channel count. Get the mode wrong and you don't get a clean error - you get a model complaining about channel mismatch, or a VAE decode that produces colour noise. Our conceptual notes cover why channel counts jumped across this generation (depth, not extra compression); the practical rule is simpler: match the mode to the checkpoint family, every time, and don't leave the default on if you're not running SD or SDXL.

    Also worth noting: the pack's KoO.Resolution Next is the newer node with the same intent and a different latent builder - it uses /8 with 16 channels for its Flux 2 option. If you're moving workflows between the two, check the shape rather than assuming the label means the same tensor.

    Where it fits

    Front of graph, always. width/height go into anything that needs dimensions - a ControlNet preprocessor, an upscale target, a filename template, a text note. The latent goes into your sampler. When you need a 2× pass, flip the multiplier and re-queue rather than rewiring an upscaler; that's how this node expects to be used.

    The resolution_label output is quietly the best feature. Wire it into a text overlay or a save prefix and your outputs are self-documenting, which matters a lot six hundred images later.

    Installing it

    cd ComfyUI/custom_nodes
    git clone https://github.com/kevintronchin-blip/koo-nodes-pack
    

    Restart and refresh the browser - this node ships a frontend component for the controls. Dependencies are ComfyUI's own four (torch, numpy, Pillow, aiohttp); no models, nothing to download. Category is KoO Tools / Resolution.

    The pack's custom canvases need the Legacy / LiteGraph renderer; under Nodes 2.0 the drawing hooks don't run. Manager/Registry listing at v1.0.3 is pending moderation approval, so use the README's ZIP route - extract to ComfyUI/custom_nodes/koo-nodes-pack with __init__.py directly inside - if search finds nothing.

    Common complaints

    "VAE decode gives noise." Wrong latent_mode for the model. Check the channel count against the checkpoint family.

    "My 2× came out 4×." The multiplier is non-cumulative by design, but stacking this node twice will still multiply: two x2 nodes in series is x4. Use one.

    "Dimensions aren't multiples of 8." Presets are clean, but custom_width steps by 8 from 64 - type 1000 and you'll get an error or a rounded value, not a silent 1000. That's the behaviour you want; just don't expect the auto-adjust some other nodes do.

    CategoryKoO Tools / Resolution

    Inputs (7)

    NameTypeDefaultDescription
    resolution_presetCOMBO1024x1024Stored preset value for old workflow compatibility.
    custom_widthINT102464–16384Base width before the x1/x2 multiplier.
    custom_heightINT102464–16384Base height before the x1/x2 multiplier.
    aspect_ratioCOMBO1:1Selected KoO aspect ratio.
    upscale_multiplierCOMBO1xFinal output multiplier. Non-cumulative.
    batch_sizeINT11–4096Latent batch size.
    latent_modeCOMBOResolution OnlyEmpty latent type to create.

    Outputs (4)

    NameTypeDescription
    widthINT—
    heightINT—
    resolution_labelSTRING—
    latentLATENT—