ComfyUI Node
Pad Image (KJ/SET)
Pad the input image and optionally mask with the specified padding. The `target_width`/`target_height` overrides left, right, top and bottom.
Pad Image (KJ/SET)
- image
- mask
- images
- masks
◄left0►
◄right0►
◄top0►
◄bottom0►
◄extra_padding0►
◄pad_mode▾►
◄color#000000►
◄target_width512►
◄target_height512►
◄pad_transparency1.0►
Categoryimage/manipulation
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| left | INT | 00–16384 | — |
| right | INT | 00–16384 | — |
| top | INT | 00–16384 | — |
| bottom | INT | 00–16384 | — |
| extra_padding | INT | 00–16384 | — |
| pad_mode | COMBO | 4 options: edge, edge_pixel, color, pillarbox_blur | |
| color | STRING | #000000 | Color for fill. Can be an hexadecimal (#RRGGBB). Can comma separated RGB values in [0-255] or [0-1.0] range. |
| maskopt | MASK | — | |
| target_widthopt | INT | 5120–16384 | Connect both `target` inputs If 0 the size of the image is used Overrides left/right/top/bottom |
| target_heightopt | INT | 5120–16384 | Connect both `target` inputs If 0 the size of the image is used Overrides left/right/top/bottom |
| pad_transparencyopt | FLOAT | 1.00–1 | The transparency for the padded area for all modes except `edge_pixel`.1.0 is fully transparent, 0.0 is fully opaque. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| masks | MASK | — |