Resolution Selector Plus
Model-Aware Empty Latents, One Dropdown Away
- width
- height
- latent
- custom_width
- custom_height
- custom_latent
Resolution Selector Plus exists to kill a tiny, recurring annoyance: every new workflow starts with you typing 1024x1024 into an EmptyLatentImage, then crossing your fingers that the size divides by 8. If you've moved to Flux, you also have to remember its latent wants 16 channels, not the 4 that EmptyLatentImage happily hands you. This node is the version that remembers the model for you.
It's a single node (Add Node > utils > Resolution Selector Plus) with one job: pick your model, pick a preset, and get back the right width, height, and an empty LATENT already shaped for that model's sampler. You wire the latent straight into a KSampler and the INTs into whatever else needs to know the size - say, a conditioning scale or an upscaler that should match the canvas.
How it works
The mechanism is refreshingly simple and it's all local - no API calls, no keys. The node ships with hardcoded preset tables per model (Flux, Qwen Image, Z-Image, SD 1.5, SDXL), covering portrait, landscape, and square sizes plus photo-print and social ratios. Across all five models that's 76 unique resolutions. A little JavaScript mirrors the table and filters the dropdown as you switch models, so you only ever see sensible sizes for what you picked.
The generated latent is a zero tensor of shape [batch, channels, height/8, width/8] on your active device - the exact same thing core's EmptyLatentImage produces, except the channel count is model-aware: 4 for SD 1.5 and SDXL, 16 for Flux, Qwen Image, and Z-Image. That distinction is the whole point. Flux and friends run a 16-channel latent space (same 8x compression, just four times the information per cell, as the KB's VAE notes), so a 4-channel latent fed into a Flux sampler isn't subtly wrong - it's broken.
Inputs and outputs that matter
You'll set three things 95% of the time:
- model - your image model, or "All." Pick a specific model to filter presets and get the right channel count.
- resolution - the preset, labeled with aspect ratio, e.g.
1024x1024 (1:1 Square)or1920x1080 (16:9 Landscape). - resolution_multiplier - 1x to 4x, for when you want the same aspect at 2x the pixels. Because it's an integer multiple of an already-valid size, divisibility survives the multiplication.
The outputs are width, height, and latent. There's also a whole optional custom track - custom_width, custom_height, custom_multiplier, custom_batch - if you want a hand-rolled size with its own independent multiplier. Leave them at 0 (the default) and the node returns 0 for the custom INTs plus a harmless minimal latent, so nothing crashes if you wire them anyway.
Where people get burned
The big one is the "All" model option. It shows every preset across all models - handy for browsing, but its latent defaults to 4 channels for backward compatibility. If you set model: All and feed that latent to a Flux sampler, you get a channel mismatch. The fix is trivial: select the specific model instead.
Second gotcha: custom dimensions still have to obey the model's constraints. Presets are always valid, but hand-typed sizes need to divide by 8 (by 16 for Flux) and stay within the model's bounds - the node validates and throws a clear error if you don't, so at least it fails loudly rather than silently.
Installation
No dependencies beyond ComfyUI's own torch, and no model files to download - it's pure Python plus a tiny JS file. The repo is currently bradsec/ComfyUI_ResolutionSelectorPlus (the pack name in the registry shortens it; search Manager for the full title).
The easy way: Manager > Custom Nodes Manager, search ComfyUI_ResolutionSelectorPlus, install, restart.
Or the manual way:
cd pathTo/ComfyUI/custom_nodes
git clone https://github.com/bradsec/ComfyUI_ResolutionSelectorPlus.git
# restart ComfyUI
One naming note: the node is registered as ResolutionSelectorPlus, deliberately, because ComfyUI core already ships a built-in ResolutionSelector in comfy_extras. That's the whole reason the "Plus" exists - so the two don't collide. If you've been ignoring this node because you assumed it was a clone of the built-in, it's not: the built-in doesn't know your model, and it certainly doesn't produce a 16-channel latent.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | COMBO | SDXL | Image model. Filters the resolution presets to that model's recommended sizes. 'All' shows every preset. |
| resolution | COMBO | 1024x1024 (1:1 Square) | Preset resolution. The list filters to the selected model. |
| resolution_multiplier | COMBO | 1x | Multiplies the preset width and height (1x to 4x). |
| batch_size | INT | 11–64 | Number of latent samples in the preset latent batch. |
| custom_widthopt | INT | 00–4096 | Custom width in pixels. 0 disables the custom outputs. Must satisfy the model's divisibility and bounds. |
| custom_heightopt | INT | 00–4096 | Custom height in pixels. 0 disables the custom outputs. Must satisfy the model's divisibility and bounds. |
| custom_multiplieropt | COMBO | 1x | Multiplies the custom width and height (1x to 4x). |
| custom_batchopt | INT | 11–64 | Number of latent samples in the custom latent batch. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| latent | LATENT | — |
| custom_width | INT | — |
| custom_height | INT | — |
| custom_latent | LATENT | — |