Flux Empty Latent Size Picker
ComfyUI Node Guide
- LATENT
- width
- height
ComfyUI's stock "Empty Latent Image" node gives you two number boxes and leaves you to remember which width/height combos actually work well for the model you're running. For Flux that's an annoying gap, because Flux is genuinely flexible on resolution - it just wants dimensions divisible by 64 and tends to hold together best somewhere in the 1-3 megapixel range. This node replaces the guesswork with a dropdown of presets that already do that math for you.
What it is. A resolution picker built specifically around Flux's sweet spot: roughly two dozen presets clustered around 1.8-3MP, each one labeled with its exact pixel dimensions, megapixel count, and aspect ratio, so you're choosing "16:9" or "1:1" instead of squinting at raw numbers. The default is 2304x1280 (2.95MP) - 16:9. There are options across the common ratios - square, portrait and landscape variants of 4:3 and 7:4, ultra-wide 2.39:1, and more - plus, if none of them fit, a manual override.
The inputs that matter:
resolution- the dropdown itself. Pick the aspect ratio that fits what you're generating; a square canvas on a multi-subject scene tends to leave empty space the model has to fill awkwardly, so matching the ratio to your composition is worth doing deliberately rather than defaulting to 1:1 out of habit.batch_size(default 1) - how many latents to generate at once. Straightforward, but remember it scales VRAM and render time roughly linearly, so don't crank it up on a big-MP preset without headroom to match.width_override/height_override(both default 0) - the escape hatch. Leave both at 0 to use the dropdown; set both to real values (steps of 8) if you need a size that isn't in the list. Since they're meant to work together, don't set only one and leave the other at 0 - that's not a real dimension.
Outputs: LATENT for your KSampler, plus width and height as separate integer outputs. Those two are more useful than they look - you can wire them straight into anything downstream that needs to know the current resolution (an upscale node, a ModelSamplingFluxNormalized-style node in a manual pipeline, whatever) without adding a separate "get image size" node just to extract two numbers you already picked.
Installing it. Search "ComfyUI-42lux" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/42lux/ComfyUI-42lux
Restart ComfyUI. Like the rest of this pack, it's pure logic - no model files to fetch, nothing extra to configure.
Where people get tripped up:
- If you're using the overrides, both need to be real nonzero values divisible by 8 - an accidental stray value in one box while the other sits at 0 will give you a broken or tiny latent instead of the preset you intended.
- Custom sizes that aren't divisible by 64 can produce artifacts on Flux even though the node's step size only enforces 8 - if you're hand-picking dimensions, round to the nearest multiple of 64 yourself rather than trusting the finer step.
- The presets top out around 3MP for a reason: that's roughly where Flux's own comfortable range ends. If you need a genuinely bigger final image, generate at one of these presets and do a second, upscale-and-refine pass rather than reaching for a huge custom size here directly - you'll get better results and spend less compute per attempt.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 2304x1280 (2.95MP) - 16:9 | 24 options: 2688x1088 (2.92MP) - 2.39:1, 2304x1280 (2.95MP) - 16:9, 2240x1280 (2.87MP) - 7:4, 1984x1472 (2.92MP) - 4:3, 1728x1728 (2.99MP) - 1:1, 1472x1984 (2.92MP) - 3:4, +18 |
| batch_size | INT | 11–4096 | — |
| width_override | INT | 00–8192 | — |
| height_override | INT | 00–8192 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| width | INT | — |
| height | INT | — |