ComfyUI Node
Resize To Canvas Size (COI)
A ComfyUI node in image/transform with 12 inputs and 2 outputs.
Resize To Canvas Size (COI)
- image
- mask
- IMAGE
- padding_mask
◄width512►
◄height512►
◄anchor_grid3,3►
◄anchor_modemanual►
◄scale_methodFit to Canvas short edge►
◄fill_methodcrop►
◄padding_fillblack►
◄custom_color_hex#000000►
◄noise_seed0►
◄custom_color_hex_input—►
Categoryimage/transform
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 5121–8192 | — |
| height | INT | 5121–8192 | — |
| anchor_grid | STRING | 3,3 | — |
| anchor_mode | COMBO | manual | 3 options: manual, mask_bbox_centre, mask_weighted_centre |
| scale_method | COMBO | Fit to Canvas short edge | 5 options: None – use original size, Fit to Canvas short edge, Fit to Canvas long edge, Fit to Canvas height, Fit to Canvas width |
| fill_method | COMBO | crop | 2 options: crop, stretch |
| padding_fill | COMBO | black | 6 options: black, white, gray_50, transparent, custom, noise |
| custom_color_hex | STRING | #000000 | — |
| noise_seed | INT | 00–18446744073709550000 | — |
| maskopt | MASK | — | |
| custom_color_hex_inputopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| padding_mask | MASK | — |