ComfyUI Node
π Aspect Ratio Simplifier
Resize an image and/or mask to a target size. Size from input image/mask, or from a preset / custom width x height. Outputs: image, mask, width, height, empty latent, batch. Settings: resolution_source (image/mask vs custom/preset); aspect_ratio preset; custom_width/height; swap_dimensions; upscale_method (default lanczos); proportion (stretch|resize|crop|pad|total_pixels); crop_location; pad_color; divisible_by (e.g. 8); max_resolution (0=no clamp); batch_size (empty latent only).
π Aspect Ratio Simplifier
- image
- mask
- image
- mask
- width
- height
- latent
- batch
- resolution
βmax_resolution2048βΊ
βresolution_sourcefalseβΊ
βaspect_ratioβΎβΊ
βcustom_width1024βΊ
βcustom_height1024βΊ
βswap_dimensionsβΎβΊ
βupscale_methodlanczosβΊ
βproportioncropβΊ
βcrop_locationcenterβΊ
βpad_color0, 0, 0βΊ
βdivisible_by8βΊ
βbatch_size1βΊ
CategoryLC123
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| max_resolution | INT | 20480β16384 | Clamp longer side. 0 = no clamp. |
| resolution_source | BOOLEAN | false | Off: size from image/mask. On: use preset or custom width x height. |
| aspect_ratio | COMBO | Preset ratio when using custom/preset source. | |
| custom_width | INT | 102416β16384 | Target width for custom size. |
| custom_height | INT | 102416β16384 | Target height for custom size. |
| swap_dimensions | COMBO | Swap width and height after size is chosen. | |
| upscale_method | COMBO | lanczos | Resampling filter. Lanczos is a good default for photos. |
| proportion | COMBO | crop | stretch=force size; resize=fit inside; crop=fill+crop; pad=fit+letterbox; total_pixels=match pixel budget. |
| crop_location | COMBO | center | Crop anchor when proportion is crop. |
| pad_color | STRING | 0, 0, 0 | RGB for pad mode. 0-255 or 0-1. |
| divisible_by | INT | 81β128 | Round width/height to a multiple of this (8 is typical for latents). |
| batch_size | INT | 11β4096 | Empty latent batch. Image/mask batch is preserved from input. |
| imageopt | IMAGE | β | |
| maskopt | MASK | β |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | β |
| mask | MASK | β |
| width | INT | β |
| height | INT | β |
| latent | LATENT | β |
| batch | INT | β |
| resolution | INT | β |