ComfyUI Node
Pad Image To Square
Pads an image to a square, optionally resizing it so its longest side matches a given size.
Pad Image To Square
- image
- image
- inverted_mask
◄longest_side0►
◄upscale_methodlanczos►
Categoryimage/transform
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| longest_sideopt | INT | 00–16384 | Resize so the longest side equals this before padding. 0 keeps the original size. |
| upscale_methodopt | COMBO | lanczos | 5 options: lanczos, bicubic, bilinear, area, nearest-exact |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The square, padded image. |
| inverted_mask | MASK | 1 over the original image area, 0 over the padding. |