Select Latent Size Plus
Aspect-ratio-first resolution picking, with the numbers to match
- Latent
- Width
- Height
This is the flagship of the pack's three resolution pickers, and the one the author actually posted about on r/comfyui. The pitch is simple: instead of typing width and height numbers into a plain Empty Latent Image node and hoping they're sane, you pick an aspect ratio first (1:1, 9:16, 2:3, and a dozen others), then a resolution within that ratio from a curated dropdown - and it hands you the empty latent plus the actual width and height as separate number outputs, so downstream nodes that need the raw dimensions don't have to guess.
What it actually gives you over the plain version
Two things the pack's other two size pickers don't have. First, swap_orientation - flip portrait to landscape (or back) without hunting through the dropdown for the mirrored entry. Second, real Width and Height outputs alongside the latent, as plain integers you can wire into anything downstream that wants the numbers - a resize step, metadata, whatever. The other two pickers in this pack only ever hand you an opaque latent.
Worth knowing: this isn't the only resolution picker in the ecosystem. ComfyRoll had one, though it's gone unmaintained; Kijai's KJNodes pack has a JSON-driven version that's more flexible if you want fully custom presets of your own. This one's case for existing is that it just works out of the box - no JSON file to write, no big multi-purpose node pack to install just to get a size picker.
How it works
aspect_ratio narrows the list to a family (the pack documents 1:1, 4:5, 3:4, 2:3, 7:10, 5:8, 7:12, 9:16, 1:1.85, 1:2, 9:21, 1:3, and a few more beyond that). resolution then picks the actual width-by-height pair sized for that ratio, from a list the author maintains and updates independently on GitHub - so the exact numbers can shift a little between pack versions. batch_size stacks copies in the output batch, same as any standard empty-latent node.
Inputs and outputs that matter
aspect_ratio- which ratio family to draw from.resolution(default512x512) - the specific size within that family.swap_orientation(enable/disable, defaultdisable) - flips width and height without re-picking.batch_size(1–10, default 1) - how many empty latents to generate at once.
Three outputs: Latent, ready to wire into a KSampler; and Width / Height as plain INTs, for anything that needs the raw numbers rather than an opaque latent tensor.
Installing it
ComfyUI Manager: search mzmaxam in Custom Nodes Manager and install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MzMaXaM/ComfyUi-MzMaXaM
Restart ComfyUI. Nothing to download - pure node logic, no dependencies. The pack also ships a couple of example workflows: in ComfyUI, open Workflow → Browse Templates, and look for the comfyui-mzmaxam category.
Where people get tripped up
With 148 resolution entries, the dropdown is long - pick aspect_ratio first, it's what keeps the resolution list navigable rather than an unsorted wall of numbers. Second, batch_size isn't free: pushing it up multiplies your VRAM use and sampling time linearly, it doesn't make anything better, just more of it. Third, this node is dropdown-only - if the size you actually want isn't on the list and a version bump hasn't added it yet, you're back to ComfyUI's stock Empty Latent Image node with manually typed numbers. And a general reminder that applies to any resolution picker: the size you choose should sit near what your checkpoint was actually trained on. Off-ratio, off-scale generations are the classic source of duplicated limbs and stretched anatomy - the point of a curated list like this one is to keep you inside sane territory in the first place.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 Square Format | 16 options: 1:1 Square Format, 4:5 Portrait Photography, 3:4 Retro CRT TV & Monitor, 2:3 Standard Photography, 7:10 Trading Cards of all sorts, 5:8 Expanded Portrait, +10 |
| resolution | COMBO | 512x512 | 148 options: 512x512, 576x576, 640x640, 704x704, 768x768, 832x832, +142 |
| swap_orientation | COMBO | disable | 2 options: enable, disable |
| batch_size | INT | 11–10 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| Latent | LATENT | Empty Latent. Width and Height of selected size. |
| Width | INT | — |
| Height | INT | — |