Nodes/ComfyUI-Desert-Pixel-Nodes/DP Strip Edge Masks
ComfyUI Node

DP Strip Edge Masks

Generate blend masks for the seams in an image strip

By DesertPixelAi·Created 2 years ago·Updated about a year ago· 25
DP Strip Edge Masks
  • images
  • combined_strip
  • edge_masks
mode
edge_width64
feather32
output_modeseparate_masks

If you've stitched images together into a strip - with this pack's own DP Stitch 2 Images, or any other method - you're left with a hard seam where they meet. DP Strip Edge Masks is the follow-up step: it looks at where images in a strip join and generates masks right along those seams, so you can feed them into an inpainting or blending pass and actually make the transition look intentional instead of pasted.

This is also the kind of node the community reaches for specifically because seamless video/image transitions are a known pain point - small utility packs like this one get pointed to exactly for this job when someone's stitched output looks obviously cut.

How it works

You give it images (the strip), a mode matching the direction the strip runs (Horizontal_Right, Horizontal_Left, Vertical_Up, Vertical_Down), and two sizing controls: edge_width sets how wide a band around each seam gets masked, and feather softens that band's edges - the same grow-then-soften idea as any mask-prep step, here applied specifically to a seam rather than a freehand region. output_mode decides whether you get separate_masks (one per seam, if your strip has more than two images joined) or a single combined_mask covering all of them at once.

Typical feathering guidance holds here too: 4-12px is a reasonable starting point for most work, with edge_width set wide enough to actually cover the visible discontinuity but not so wide it eats detail well inside each individual image.

Inputs and outputs

Required:

  • images - the stitched strip.
  • mode - Horizontal_Right, Horizontal_Left, Vertical_Up, Vertical_Down (should match how the strip was actually assembled).
  • edge_width (0-512, default 64) - how wide a band gets masked around each seam.
  • feather (0-256, default 32) - how much that band's edges are softened.
  • output_mode - separate_masks (default) or combined_mask.

No optional inputs.

Two outputs: combined_strip (IMAGE, the strip passed through) and edge_masks (MASK, the generated seam masks) - wire edge_masks into whatever blending or inpainting step comes next.

Installing it

ComfyUI Manager: search ComfyUI-Desert-Pixel-Nodes, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/DesertPixelAi/ComfyUI-Desert-Pixel-Nodes

Restart ComfyUI - image/mask math only, nothing to download.

Where people get tripped up

mode has to match how the strip was actually built. This node needs to know where the seams are to mask them, and it infers that from the direction you tell it - if you stitched Horizontal_Right but tell this node Vertical_Up, it's looking for seams in the wrong place entirely and the masks it generates won't line up with anything. Keep the mode consistent between your stitch step and this one.

edge_width too narrow misses the actual seam. If your source images had even a slight brightness or color mismatch, a narrow edge band can leave a visible sliver of hard transition just outside the masked region. Err a bit wider than you think you need, then rely on feather to keep the wider band from looking like an obvious soft rectangle.

output_mode mismatch with your next node. If whatever you're feeding edge_masks into expects one mask per seam and you've set combined_mask, you'll get correct-looking output that's structurally the wrong shape for that downstream node. Check what the next node in your chain actually expects before assuming this one's default is right for your case.

CategoryDP/image

Inputs (5)

NameTypeDefaultDescription
imagesIMAGE
modeCOMBO4 options: Horizontal_Right, Horizontal_Left, Vertical_Up, Vertical_Down
edge_widthINT640–512
featherINT320–256
output_modeCOMBOseparate_masks2 options: separate_masks, combined_mask

Outputs (2)

NameTypeDescription
combined_stripIMAGE
edge_masksMASK