ComfyUI Node
Resolution Selector (MP + Ratio)
Selects the resolution closest to the requested megapixels and aspect ratio, snapped to a multiple. Outputs an empty latent, width/height, and the input image resized (lanczos) and center-cropped to fit.
Resolution Selector (MP + Ratio)
- image
- latent
- width
- height
- image
◄megapixels1.05►
◄aspect_width3►
◄aspect_height4►
◄multiple32►
◄use_imagefalse►
◄use_image_ratiofalse►
◄latent_typeFlux / SD3►
Categoryutils/resolution
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| megapixels | FLOAT | 1.050.01–64 | Target size in megapixels, e.g. 4.15 |
| aspect_width | INT | 31–8192 | Aspect ratio width term (e.g. 16 in 16:9) |
| aspect_height | INT | 41–8192 | Aspect ratio height term (e.g. 9 in 16:9) |
| multiple | INT | 321–1024 | Each edge is snapped to a multiple of this |
| use_image | BOOLEAN | false | Off = ignore the input image entirely |
| use_image_ratio | BOOLEAN | false | Use the input image's aspect ratio instead of aspect_width / aspect_height |
| latent_type | COMBO | Flux / SD3 | Latent channel format for the empty latent |
| imageopt | IMAGE | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |
| image | IMAGE | — |