π Resolution Image Size Selector
Presets for every model, plus a latent, in one node
- image (optional)
- width
- height
- latent
The node for not doing aspect-ratio math by hand every time you switch checkpoints. It ships 107 built-in presets covering the current model lineup - SDXL, Z-Image, and the rest - plus your own saved favorites, and it hands back a ready-made blank latent so you can skip EmptyLatentImage entirely. The preset list being kept current enough to include Z-Image is a decent signal this pack gets maintained as new model families show up, not left frozen at whatever was popular when it was first written.
How it works
There's a strict, stated priority order for where the final resolution comes from: an input image beats a user preset, which beats the built-in preset, which beats typing custom numbers (only actually used when preset is set to Custom). Whichever source wins, you can still adjust the result afterward with multiply (scale the whole resolution up or down; negative values flip width and height) and swap_width_and_height.
The inputs and outputs that matter
preset- 107 choices, defaultCustom. Pick by name (e.g. "SDXL: [Square] 1024x1024 1:1") instead of memorizing numbers per model family.preset_user- your own saved favorites, overridespresetwhen set to anything other thanNone.custom_width/custom_height- only used whenpresetis exactlyCustom.multiplyandswap_width_and_height- post-adjustments applied after the base resolution is chosen.image(optional) - when connected, its size drives the resolution instead of any preset, withimage_min_length/image_max_lengthavailable to clamp the short/long side, andsnap_to_nearest+snap_resolutionto round to a clean multiple.batch_size(optional) - how many latents to generate.
Outputs: width, height, and latent - a blank latent already sized and ready for your sampler.
How to install it
Via ComfyUI Manager: search ComfyUI-mnemic-nodes, install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MNeMoNiCuZ/ComfyUI-mnemic-nodes
Restart ComfyUI. No model downloads or extra dependencies.
Common issues & troubleshooting
Typed custom numbers get ignored. custom_width/custom_height only apply when preset is set to exactly Custom - if a built-in preset is still selected, your custom numbers sit there unused while the preset's resolution wins. This is the single most common "why is my resolution wrong" moment with this node.
An image connection is overriding everything. Per the stated priority order, a wired image input always beats your preset or custom choice, no exceptions. A stray or leftover image connection from earlier graph edits is an easy thing to forget about and a common source of unexpected resolutions.
Odd results with multiply set negative. That's documented, working-as-intended behavior - a negative multiplier deliberately flips width and height rather than just producing negative dimensions, which is a fast way to rotate a resolution 90 degrees without touching swap_width_and_height separately.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| preset | COMBO | Custom | Select a model-specific resolution preset or use custom dimensions |
| preset_user | COMBO | None | User-defined preset selection (overrides main preset when selected) |
| custom_width | INT | 51264β16384 | Custom width (Only used with Custom preset) |
| custom_height | INT | 51264β16384 | Custom height (Only used with Custom preset) |
| multiply | FLOAT | 1.00 | Multiplier for the final resolution. Negative values will flip the dimensions. |
| swap_width_and_height | BOOLEAN | false | Swap width and height dimensions |
| image (optional)opt | IMAGE | Priority order for resolution selection: 1. Input Image 2. User Preset 3. Preset 4. Custom Values (when preset is set to 'Custom') | |
| image_min_lengthopt | INT | 00β16384 | When image is provided, ensures the shortest side is at least this length (0 = ignore) |
| image_max_lengthopt | INT | 00β16384 | When image is provided, ensures the longest side is at most this length (0 = ignore) |
| snap_to_nearestopt | BOOLEAN | false | When enabled, dimensions will be adjusted to the nearest multiple of snap_resolution |
| snap_resolutionopt | INT | 00β16384 | Snap dimensions to multiples of this value (0 = no snapping) |
| batch_sizeopt | INT | 11β64 | Number of latent images to generate in batch |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| width | INT | The final scaled width in pixels. |
| height | INT | The final scaled height in pixels. |
| latent | LATENT | The final scaled latent. |