Extensions/comfyui-311-inpaint
ComfyUI Extension

comfyui-311-inpaint

Inpaint helper nodes for ComfyUI (311 series). First node: Add Margins — pad an image and its mask with extra width/height, centered on a configurable fill color.

By Latentnaut·Created 23 days ago·Updated 23 days ago· 0
Latentnaut/ComfyUI-311-Inpaint
Nodes
On cloudLocal install
Stars0
Updated23 days ago
Readme

ComfyUI-311-Inpaint

Inpaint helper nodes for ComfyUI (311 series).

Add Margins 311

Default (square_longest)

Matches the working workflow:

  1. Take the longest side of the input image
  2. Build a black 1:1 canvas of that size
  3. Multiply by scale_by = 1.25
  4. Center the original image and mask on that canvas (no content stretch)

Example: 500×712 → longest 712 → canvas 890×890 (712 × 1.25).

| Setting | Default | |---------|---------| | size_mode | square_longest | | scale_by | 1.25 | | fill_color | #000000 | | halign / valign | center |

Other modes

  • add_margins: symmetric extras or custom per-side (pixels / percent)
  • target_size: fit (contain) onto absolute target_width × target_height