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_SamplingUtils > Image Blend by Mask

ComfyUI Node: Image Blend by Mask

Class Name

ImageBlendByMask

Category
utils/mask
Author
silveroxides (Account age: 2211days)
Extension
ComfyUI_SamplingUtils
Latest Updated
2026-06-03
Github Stars
0.02K

How to Install ComfyUI_SamplingUtils

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

Image Blend by Mask Description

Blend two images using a mask for seamless integration and creative control with smooth transitions.

Image Blend by Mask:

The ImageBlendByMask node is designed to blend two images together using a mask to control the blending process. This node is particularly useful for creating composite images where specific areas of one image are seamlessly integrated with another. By utilizing a mask, you can precisely define which parts of the images should be visible and how they should be blended, allowing for creative control over the final output. The node supports blending based on a specified percentage, enabling smooth transitions between images. This functionality is beneficial for tasks such as image editing, artistic compositions, and visual effects, where blending different visual elements is required to achieve a cohesive result.

Image Blend by Mask Input Parameters:

img_a

This parameter represents the first image to be blended. It serves as the base image onto which the second image will be blended. The quality and resolution of this image will directly affect the final output, as it forms the foundation of the composite image.

img_b

This parameter is the second image that will be blended onto the first image. The areas of this image that will be visible in the final output are determined by the mask and blend percentage. The resolution and content of this image should complement the first image to achieve a harmonious blend.

mask

The mask parameter is a crucial component that dictates which parts of the images will be visible in the final blend. It is typically a grayscale image where white areas represent full visibility of the second image, black areas represent full visibility of the first image, and gray areas represent varying levels of transparency. This allows for precise control over the blending process.

blend_percentage

This parameter controls the overall blending intensity between the two images. It is a value between 0 and 1, where 0 means no blending (only the first image is visible) and 1 means full blending (only the second image is visible). Adjusting this parameter allows you to fine-tune the transition between the images, creating either subtle or pronounced effects.

Image Blend by Mask Output Parameters:

blended_image

The output of the ImageBlendByMask node is the blended image, which is a composite of the two input images based on the provided mask and blend percentage. This image reflects the seamless integration of the specified areas from both images, resulting in a new visual that combines elements from each source. The quality and appearance of the blended image depend on the input parameters and the effectiveness of the mask in defining the blending regions.

Image Blend by Mask Usage Tips:

  • Ensure that the mask accurately represents the areas you want to blend; use high-contrast masks for clear separation and smooth gradients for subtle transitions.
  • Experiment with different blend percentages to achieve the desired level of integration between the images, adjusting for either a subtle or dramatic effect.
  • Use high-resolution images for both inputs to maintain quality in the final blended image, especially if the output will be used for print or high-definition displays.

Image Blend by Mask Common Errors and Solutions:

Mask dimension mismatch

  • Explanation: This error occurs when the dimensions of the mask do not match the dimensions of the input images.
  • Solution: Ensure that the mask is resized to match the dimensions of the input images before using it in the blending process.

Invalid blend percentage

  • Explanation: This error arises when the blend percentage is set outside the valid range of 0 to 1. - Solution: Adjust the blend percentage to be within the range of 0 to 1 to ensure proper blending functionality.

Image format not supported

  • Explanation: This error can occur if the input images are not in a supported format.
  • Solution: Convert the images to a compatible format, such as PNG or JPEG, before using them in the node.

Image Blend by Mask Related Nodes

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

Image Blend by Mask