SDXL Empty Latent Size Picker v2
A better empty latent picker than the one the ecosystem abandoned
- LATENT
- width
- height
- resolution_text
- batch_size
The stock SDXL Empty Latent in ComfyUI gives you a resolution field and a batch size and calls it a day. The essentials pack's Empty Latent Size Picker was the community's fix for that, and this node is a v2 of that idea - more resolutions, a multiplier, and a swap-dimensions toggle. If you generate SDXL-adjacent content (including Illustrious, NoobAI, Pony) and you're tired of typing 1024x1024 and hoping, this is the node that turns resolution selection into a dropdown.
Why you'd reach for it
The author credits cubiq's original, then adds the honest caveat: "since the essentials suite is pretty much near-abandoned, I still wanted to make an adjustment." That's the pitch - the same curated-resolution approach, kept alive and extended. Instead of free-typing dimensions (which risks multiples-of-8 violations and off-bucket ratios that SDXL handles poorly), you pick from a list of 40 pre-checked ratios spanning 512x2048 (0.25 aspect) through 1024x1024 up to 2048x512 (4.0 aspect). Every entry is a ratio the model family was actually trained around.
How it works
Pick a resolution and the node parses the dimensions out of the dropdown string, then applies three adjustments in order: width_override/height_override replace the values if you set them above zero, resolution_multiplier scales the result, and swap_dimensions flips width and height. Then it allocates a zeros latent of [batch_size, 4, h/8, w/8] - the 4 channels and 8x compression being SDXL's latent format. The five outputs (LATENT, width, height, resolution_text, batch_size) let you use the same size decision to drive metadata or downstream nodes without parsing anything yourself.
The inputs that matter
- resolution (enum, 40 choices) - the core input. Everything else is a tweak on top of this.
- batch_size (INT, default
1) - latents to allocate. - width_override / height_override (INT, default
0, step 8) - set above 0 to force a specific dimension instead of the picked one. - resolution_multiplier (FLOAT, default
1) - scale the whole thing. 0.5 halves, 2 doubles. - swap_dimensions (BOOLEAN) - flip W/H for the same aspect ratio rotated.
- Outputs: LATENT, width, height, resolution_text, batch_size.
Installing it
Part of comfyui-lopi999-nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/LaVie024/comfyui-lopi999-nodes
Restart ComfyUI, or search "comfyui-lopi999-nodes" in ComfyUI Manager. No model downloads; it's stock torch plus the pack.
Common issues
The two overrides are the classic source of confusion: they're defaulted to 0 and only take effect when positive, so leaving them alone means "use the picked resolution." If you set both overrides and forget about them, the dropdown becomes decoration. And while the multiplier is handy, pushing a 0.25-aspect entry to 2x is a recipe for VRAM pain - the node will happily allocate whatever you ask for, and the GPU will not. Start from 1.0, move in 0.05 steps, and watch your memory.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 1024x1024 (1.0) | 40 options: 512x2048 (0.25), 512x1984 (0.26), 512x1920 (0.27), 512x1856 (0.28), 576x1792 (0.32), 576x1728 (0.33), +34 |
| batch_size | INT | 11–4096 | — |
| width_override | INT | 00–16384 | — |
| height_override | INT | 00–16384 | — |
| resolution_multiplier | FLOAT | 1.000.01–100 | — |
| swap_dimensions | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| width | INT | — |
| height | INT | — |
| resolution_text | STRING | — |
| batch_size | INT | — |