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-CustomNodeKit > 遮罩批次合成 (Ref)

ComfyUI Node: 遮罩批次合成 (Ref)

Class Name

MaskCompositeRef

Category
image
Author
user2318 (Account age: 2574days)
Extension
ComfyUI-CustomNodeKit
Latest Updated
2026-07-16
Github Stars
0.05K

How to Install ComfyUI-CustomNodeKit

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

遮罩批次合成 (Ref) Description

Facilitates batch image composition with masks for precise blending and overlaying in AI art and animation workflows.

遮罩批次合成 (Ref):

The MaskCompositeRef node is designed to facilitate batch processing of image compositions using masks. This node is particularly useful for AI artists who need to apply complex masking operations across multiple images efficiently. By leveraging the power of batch processing, MaskCompositeRef allows you to composite images with precision, using reference masks to guide the blending and overlaying of image layers. This node is essential for tasks that require consistent application of masks across a series of images, such as creating animations or applying uniform effects to a collection of artworks. Its primary goal is to streamline the compositing process, ensuring that each image in the batch is processed with the same level of detail and accuracy.

遮罩批次合成 (Ref) Input Parameters:

destination

The destination parameter represents the target image or batch of images where the source image will be composited. It serves as the canvas onto which the source image is applied, guided by the mask. This parameter is crucial as it determines the base image that will be modified. There are no specific minimum or maximum values for this parameter, as it depends on the image dimensions and format.

source

The source parameter is the image or batch of images that will be composited onto the destination. This parameter is essential as it provides the content that will be overlaid onto the destination image. Like the destination, there are no specific constraints on the source image's dimensions or format.

x

The x parameter specifies the horizontal position where the source image will be placed on the destination image. It allows you to control the alignment of the source image, ensuring it is positioned correctly. The default value is 0, with a minimum of 0 and a maximum determined by the resolution of the destination image.

y

The y parameter determines the vertical position for placing the source image on the destination. Similar to the x parameter, it provides control over the vertical alignment of the source image. The default value is 0, with a minimum of 0 and a maximum based on the destination image's resolution.

resize_source

The resize_source parameter is a boolean option that, when enabled, resizes the source image to fit within the destination image's dimensions. This is particularly useful when the source image is larger or smaller than the destination, ensuring a seamless composite. The default value is False.

mask

The mask parameter is an optional input that defines the areas of the source image to be composited onto the destination. It acts as a guide for blending, allowing for selective application of the source image. If no mask is provided, the entire source image is used. This parameter is crucial for achieving precise and controlled compositing effects.

遮罩批次合成 (Ref) Output Parameters:

result_batch

The result_batch output contains the batch of images resulting from the compositing operation. Each image in the batch reflects the application of the source image onto the destination, guided by the mask. This output is essential for verifying the success of the compositing process and for further processing or saving the composited images.

result_mask_batch

The result_mask_batch output provides the batch of masks used during the compositing process. This output is useful for understanding how the masks were applied and for debugging or refining the compositing operation. It allows you to see the areas of the source image that were blended onto the destination.

遮罩批次合成 (Ref) Usage Tips:

  • Ensure that the destination and source images are of compatible dimensions to avoid unexpected results. Use the resize_source option if necessary to fit the source image within the destination.
  • Utilize the mask parameter to achieve precise compositing effects. Experiment with different masks to see how they affect the blending of the source image onto the destination.
  • When working with large batches of images, consider the computational resources required for processing. Optimize the size and resolution of your images to balance quality and performance.

遮罩批次合成 (Ref) Common Errors and Solutions:

Image dimensions mismatch

  • Explanation: This error occurs when the dimensions of the source and destination images are incompatible, leading to issues during compositing.
  • Solution: Use the resize_source parameter to adjust the source image size to match the destination, or manually resize the images before processing.

Mask not applied correctly

  • Explanation: If the mask is not applied as expected, it may be due to incorrect mask dimensions or format.
  • Solution: Ensure that the mask dimensions match those of the source image and that it is in the correct format. Verify the mask's content to ensure it accurately represents the desired areas for compositing.

Out of memory error

  • Explanation: Processing large batches of high-resolution images can lead to memory exhaustion.
  • Solution: Reduce the batch size or image resolution to fit within available memory resources. Consider processing images in smaller batches if necessary.

遮罩批次合成 (Ref) Related Nodes

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

遮罩批次合成 (Ref)