Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > comfyui-LatLong > Create Seam Mask

ComfyUI Node: Create Seam Mask

Class Name

LatLong Create Seam Mask

Category
LatLong/Mask
Author
cedarconnor (Account age: 5169days)
Extension
comfyui-LatLong
Latest Updated
2026-09-16
Github Stars
0.0K

How to Install comfyui-LatLong

Install this extension via the ComfyUI Manager by searching for comfyui-LatLong
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter comfyui-LatLong in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Create Seam Mask Description

Creates a vertical seam mask for lat-long inpainting with adjustable width, feathering, and shift.

Create Seam Mask:

LatLong Create Seam Mask creates a vertical mask for working on a seam in a lat-long, or equirectangular, image. The mask marks a strip at the horizontal center of the image so you can target that area during seam inpainting. You can make the strip narrower or wider, soften its edges, or move it halfway around the image to match an image that has been rolled horizontally. This helps you work on the seam area without selecting it by hand.

Create Seam Mask Input Parameters:

image

A required IMAGE used to determine the mask’s batch size, height, and width. Connect the image whose seam you intend to work on, or an image with the same dimensions, so the resulting mask lines up with it. The node expects an image shaped as batch, height, width, and channels: (B,H,W,C). There is no default, minimum, or maximum value specified for this input.

frac_width

Sets the seam strip’s width as a fraction of the image width. Its default is 0.1, or 10% of the width; the allowed range is 0.0 to 1.0, in steps of 0.01. For example, on an image 1,000 pixels wide, 0.1 requests a strip about 100 pixels wide. This setting is ignored whenever pixel_width is greater than 0. A smaller value targets a narrower area, while a larger value covers more of the image.

pixel_width

Sets an explicit seam-strip width in pixels. Its default is 0; the allowed range is 0 to 8192, in steps of 1. When you set it above 0, it overrides frac_width. Use it when you need a consistent pixel width, especially when preparing images of different sizes. Leave it at 0 to use the proportional width instead.

feather

Sets the feather width in pixels on both sides of the seam strip. Its default is 0; the allowed range is 0 to 2048, in steps of 1. At 0, no feathering is requested. Increasing it softens the mask’s edges, giving an inpainting step a more gradual transition between the targeted strip and the surrounding image.

roll_x_by_50_percent

Controls whether the completed mask is shifted horizontally by half the image width. The options are false and true, with false as the default. Leave it false to keep the strip centered; set it to true when the image you are masking has been rolled horizontally by 50%, such as for a 180° shift. The node shifts the mask by the integer half-width of the image, so positioning on odd-width images follows that whole-pixel shift.

Create Seam Mask Output Parameters:

seam_mask

A MASK sized from the reference image, with a vertical strip marking the seam area. By default, that strip is centered horizontally. Its edges can be feathered, and the entire mask can be shifted horizontally by half the image width when requested. Connect it to a step that accepts a mask to target the seam for inpainting. The provided source does not specify the mask’s exact numeric values or the precise shape of its feathering transition.

Create Seam Mask Usage Tips:

  • Start with frac_width at its default 0.1 and pixel_width at 0. Adjust the fraction while previewing the mask so the strip covers the visible seam without including more of the image than necessary.
  • Use pixel_width above 0 when you have a known seam width in pixels. Remember that this disables the effect of frac_width until you set pixel_width back to 0.
  • Start with feather at 0 to check placement. Increase it if the inpainted area needs a softer transition at either edge.
  • When using Roll Image to move the seam, check where the seam appears in the image being sent to inpainting. Turn on roll_x_by_50_percent only when a half-width shift puts this mask over that location.
  • Connect the image being masked, or one with matching dimensions, to image. Preview the mask against the working image before inpainting to confirm its width and position.

Create Seam Mask Common Errors and Solutions:

Expected IMAGE (B,H,W,C), got shape (...)

  • Explanation: This error is raised when the connected image does not have the four dimensions the node expects: batch, height, width, and channels. The shape shown in the message identifies what the node received.
  • Solution: Connect a standard IMAGE output with shape (B,H,W,C). Check for an upstream step that changed the image into another kind of data or removed a dimension.

Image validation error before mask creation

  • Explanation: The node validates image before checking its shape, but the provided source does not show the validator’s error messages or all conditions it checks.
  • Solution: Confirm that image comes from a working IMAGE-producing node and can be used elsewhere in your workflow. If an error persists, use its exact message to identify the upstream image issue; do not assume it is a mask-width problem.

Input value is outside the allowed range

  • Explanation: The interface specifies limits for frac_width (0.0–1.0), pixel_width (0–8192), and feather (0–2048). A workflow or connected value outside those limits may be rejected by the interface. The provided source does not specify an exact error message for this case.
  • Solution: Bring the value within its listed range. Use pixel_width at 0 when you want frac_width to control the strip.

No error, but changing frac_width has no effect

  • Explanation: This is expected when pixel_width is greater than 0: the explicit pixel width takes priority. It is not an error message from the node.
  • Solution: Set pixel_width to 0 to control the strip with frac_width, or keep pixel_width above 0 and adjust that value instead.

No error, but the mask misses the seam

  • Explanation: The default strip is centered, while enabling roll_x_by_50_percent moves the mask by half the image width. A mismatch between the image’s current position and this setting can place the strip away from the seam. This is a placement symptom, not an error message.
  • Solution: Preview the mask over the image you will inpaint. Toggle roll_x_by_50_percent to match whether that image has been rolled, then adjust the strip width if needed.

Create Seam Mask Related Nodes

Go back to the extension to check out more related nodes.
comfyui-LatLong
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Create Seam Mask