Visual Latent Size Picker (Studio Leiel)
Stop settling for one aspect ratio — keep a list of sizes in a single node
- model
- latent
- width
- height
- size_text
Most workflows settle on one aspect ratio not because it's right, but because changing it is work. A node graph has no way to hold a list: ten sizes mean twenty width/height nodes, two switches fed from the same index, and a rewire every time you add one. Faced with that, almost everyone picks one ratio and types over it by hand. Visual Latent Size Picker (class name RandomLatentSizePicker, an old name that stuck so existing workflows don't break) is the list that lives in one node - picked at random, stepped through in order, or pinned to one.
And because it keeps the sizes on disk rather than in the wiring, every workflow sees the same list. Edit it once and it changes everywhere; adding a size costs a line of typing, not a rebuild.
How it works
The important detail: the model input is required even though the model_family widget picks the size table. The node reads the latent format off the connected checkpoint - channel count, dimension count, downscale ratio - so the latent it hands out is correct for that model, not a generic guess. It builds the candidate list from the family's built-in table (there are tables for krea2, z-image, flux, boogu, hidream, sdxl and sd1.5), narrows by resolution_preset, then rounds the chosen size to the model's downscale multiple before building a zero latent at the right channel count.
Width and height always travel as a pair. That alone kills the classic 900×1536 mismatch you get from feeding two separate switches.
The inputs that matter
mode-randomdraws from the list with the seed;fixedpins one size;sequentialsteps one place along the list per run.model_family- which size table to offer.custom sizeis your own list, edited in the node and saved toComfyUI/user/random_latent_size_picker/custom_sizes.json.seed- insequentialmode this doubles as the step counter, so set itscontrol_after_generatetoincrementand queue N runs against an N-size list: every size is used exactly once. (The usualcontrol_after_generatefootgun applies - the widget fires after the run, so set it before you queue.)resolution_preset-landscape,portrait,square,all, orcustom. Set it tocustomand the built-in and saved lists are ignored entirely; only what you type intoresolution_textis used.batch_size- behaves as anywhere else: one size chosen per run, so a batch is that many images at the same size.
Outputs are latent (straight into your sampler's latent socket), plus width, height and size_text ("1536 x 1024") for wiring into a filename or a note node. The chips are coloured by orientation - blue landscape, violet portrait, green square - so the shape of the list reads at a glance.
Install
Part of Visual Suite (Studio Leiel): search that in ComfyUI Manager, or
cd ComfyUI/custom_nodes
git clone https://github.com/StudioLeiel/comfyui-visual-suite
then restart. No dependencies beyond stock ComfyUI, no model downloads - the size tables ship in the pack.
Common issues
- "Could not detect the latent format from the connected MODEL." The
modelsocket is empty or wired to something that isn't a loader output. Connect a model output and it's happy. - My custom sizes aren't showing up. If
resolution_presetiscustom, the node deliberately ignores your saved list and only readsresolution_text- that's by design, a one-off set that doesn't belong in the saved list. - A size won't render. Off-native resolutions are where artifacts live; the built-in tables stick to sane ratios for each family. If you're typing your own, stay inside the model's usable range - this node will happily hand you an 8K latent if you ask, and the sampler will not thank you for it.
It's a small utility, but it's the fix for the most common way people get stuck in one aspect ratio forever. Keep a list, sweep it, and only pin the one you actually like.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| mode | COMBO | random | 3 options: random, sequential, fixed |
| model_family | COMBO | krea2 | 8 options: krea2, z-image, flux, boogu, hidream, sdxl, +2 |
| seed | INT | 00–18446744073709550000 | — |
| resolution_preset | COMBO | all | 5 options: landscape, portrait, square, all, custom |
| resolution_list | COMBO | 1536×1024 (1.5) | 62 options: 640×1536 (0.42), 816×1920 (0.42), 576×1344 (0.43), 704×1408 (0.5), 704×1344 (0.52), 448×832 (0.54), +56 |
| resolution_text | STRING | — | |
| sequence | STRING | — | |
| batch_size | INT | 11–64 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |
| size_text | STRING | — |