Nodes/Image Misc/Pad Image (KJ/SET)
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.

By set-soft·Created about a year ago·Updated 7 months ago· 2
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)

NameTypeDefaultDescription
imageIMAGE
leftINT00–16384
rightINT00–16384
topINT00–16384
bottomINT00–16384
extra_paddingINT00–16384
pad_modeCOMBO4 options: edge, edge_pixel, color, pillarbox_blur
colorSTRING#000000Color for fill. Can be an hexadecimal (#RRGGBB). Can comma separated RGB values in [0-255] or [0-1.0] range.
maskoptMASK
target_widthoptINT5120–16384Connect both `target` inputs If 0 the size of the image is used Overrides left/right/top/bottom
target_heightoptINT5120–16384Connect both `target` inputs If 0 the size of the image is used Overrides left/right/top/bottom
pad_transparencyoptFLOAT1.00–1The transparency for the padded area for all modes except `edge_pixel`.1.0 is fully transparent, 0.0 is fully opaque.

Outputs (2)

NameTypeDescription
imagesIMAGE
masksMASK