Nodes/ComfyUI-Flux2LatentPresets/Flux 2 Empty Latent Presets
ComfyUI Node

Flux 2 Empty Latent Presets

Flux 2's resolution presets without the mental math

By DanPli·Created 7 months ago·Updated 7 months ago· 0
Flux 2 Empty Latent Presets
    • latent
    • width
    • height
    preset1MP | 1:1 | 1024 x 1024
    invertfalse
    batch_size1

    Flux 2 is a picky eater about resolution. The distilled Klein models are happiest in the 1MP–2MP range, BFL calls 400² the safe floor for draft work, and anything pushing past 4MP starts eating VRAM you probably don't have. The stock Empty Latent Image node makes you type a width and height and hope you're inside that window. This node replaces the guessing with a dropdown of Black Forest Labs' own recommended dimensions.

    It's about as unglamorous as a custom node gets - pick a preset, get a latent. But it's the kind of small thing that keeps you from breaking concentration mid-workflow, and it quietly teaches you the resolutions the model actually wants while you use it.

    How it works

    Under the hood it's the same deal as ComfyUI's built-in Empty Latent Image: it allocates a tensor of zeros with 4 channels at 1/8 the pixel resolution (1024 x 1024 becomes a 128 x 128 latent), which is exactly the latent layout Flux 2 Dev and Klein expect. No model files, no API calls, no requirements.txt - the whole pack is one Python file importing only torch, which ComfyUI already has. The preset values come from Scenario's Flux 2 essentials guide, which mirrors BFL's own detail-tier recommendations, and every dimension is divisible by 8 so nothing trips the model's resolution checks.

    The preset string carries the math. 1MP | 16:9 | 1344 x 768 gets parsed into width and height at generation time, and both are also exposed as INT outputs - wire those into a latent resize, an image saver's metadata, or anything else that wants the dimensions as numbers.

    The inputs that matter

    There are only three, and you'll touch one of them:

    • preset - the dropdown: 25 choices across Draft (0.15MP), Standard (0.5MP–1MP), and High Detail (2MP–4MP) tiers, each offered in 1:1, 16:9, 3:2, 4:3, 5:4, and 9:16.
    • invert - swaps width and height. For when you realize you want the portrait orientation of a landscape composition without retyping.
    • batch_size - 1 to 4096. Great for batching variations; also the easiest way to OOM yourself if you're careless with it.

    Defaults are sensible: 1MP at 1:1 (1024 x 1024) is the standard tier and, honestly, where you'll leave it most of the time. Outputs are latent (LATENT), width (INT), and height (INT).

    Installing

    Via ComfyUI Manager - search Flux2LatentPresets - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DanPli/ComfyUI-Flux2LatentPresets
    

    Then restart ComfyUI. No model downloads, no extra Python dependencies, so this is one of the least risky installs in the whole Manager registry. If the node fails to appear, the usual suspect is a mangled folder layout - it needs __init__.py at the top and a nodes/ subdirectory holding flux2_latent_presets.py. It shows up under Add Node → Flux 2 → Latents → Flux 2 Empty Latent Presets.

    Where you'll get burned

    VRAM is the real gotcha, not the node. The 4MP presets (2048 x 2048, 2688 x 1536, that crowd) are legitimate Flux 2 territory but they will flatten an 8GB card - Klein wants roughly 13GB even at modest sizes, Dev wants 18–24GB quantized, and resolution is a big chunk of that bill. This is exactly why the 0.15MP 400² preset exists: sketch and iterate there, then jump to 1MP–2MP for anything you'd call a final.

    One more thing to know: invert is a swap at creation time, not an editor. It does nothing to a latent you've already built, so flip it before you hit Queue, not after you've rendered the wrong orientation and are staring at a photo you'd have to regenerate anyway.

    CategoryFlux 2/Latents

    Inputs (3)

    NameTypeDefaultDescription
    presetCOMBO1MP | 1:1 | 1024 x 102425 options: 0.15MP | 1:1 | 400 x 400, 0.5MP | 1:1 | 704 x 704, 0.5MP | 16:9 | 960 x 544, 0.5MP | 3:2 | 896 x 600, 0.5MP | 4:3 | 832 x 624, 0.5MP | 5:4 | 800 x 640, +19
    invertBOOLEANfalse
    batch_sizeINT11–4096

    Outputs (3)

    NameTypeDescription
    latentLATENT
    widthINT
    heightINT