ComfyUI > Nodes > LanPaint > LanPaint Mask Blend

ComfyUI Node: LanPaint Mask Blend

Class Name

LanPaint_MaskBlend

Category
image/postprocessing
Author
scraed (Account age: 4120days)
Extension
LanPaint
Latest Updated
2026-04-11
Github Stars
1.1K

How to Install LanPaint

Install this extension via the ComfyUI Manager by searching for LanPaint
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter LanPaint 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

LanPaint Mask Blend Description

LanPaint_MaskBlend enables smooth image blending using a refined mask for seamless transitions.

LanPaint Mask Blend:

LanPaint_MaskBlend is a node designed to facilitate the blending of two images using a mask to control the transition between them. This node is particularly useful in scenarios where you want to seamlessly merge two images, ensuring that the transition is smooth and visually appealing. The primary function of this node is to take a binary mask and refine it so that the transition from one image to another is gradual rather than abrupt. This is achieved by smoothing the mask, which involves adjusting the mask values based on the distance to the nearest pixel with a value of one. This approach ensures that the blending effect is natural and avoids harsh edges, making it ideal for applications in image editing and inpainting where a subtle blend is required.

LanPaint Mask Blend Input Parameters:

image1

image1 is the first image tensor that you want to blend. It serves as one of the two primary images in the blending process. The quality and resolution of this image will directly affect the final blended output.

image2

image2 is the second image tensor that you want to blend with image1. Like image1, the quality and resolution of this image are crucial for achieving a high-quality blend.

mask

mask is a binary tensor that determines how the two images are blended. The mask values are smoothed to create a gradual transition between the images. Pixels with a value of one in the mask will retain the corresponding pixel from image1, while pixels with a value of zero will take from image2.

blend_overlap

blend_overlap is an integer that specifies the extent of the overlap between the two images during blending. This parameter controls how much of the transition area is smoothed, affecting the softness of the blend. The default value is not specified, but it should be chosen based on the desired blending effect.

LanPaint Mask Blend Output Parameters:

blended_image

blended_image is the resulting tensor after blending image1 and image2 using the smoothed mask. This output represents the final image where the transition between the two input images is seamless and visually coherent.

LanPaint Mask Blend Usage Tips:

  • Ensure that image1 and image2 have the same dimensions to avoid errors during the blending process.
  • Adjust the blend_overlap parameter to control the smoothness of the transition. A higher value will result in a softer blend.
  • Use a high-quality mask to achieve the best blending results. The mask should accurately represent the areas where the transition should occur.

LanPaint Mask Blend Common Errors and Solutions:

Dimension Mismatch Error

  • Explanation: This error occurs when image1, image2, and mask do not have matching dimensions.
  • Solution: Ensure that all input tensors have the same dimensions before passing them to the node.

Invalid Mask Values

  • Explanation: The mask contains values other than 0 or 1, which can lead to unexpected blending results.
  • Solution: Verify that the mask is binary, with values strictly set to 0 or 1, before using it in the blending process.

LanPaint Mask Blend Related Nodes

Go back to the extension to check out more related nodes.
LanPaint
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.