Visit ComfyUI Online for ready-to-use ComfyUI environment
Seamlessly merge images with precise masking and positioning control for complex compositions and localized effects.
The D2 Paste By Mask node is designed to seamlessly combine two images by specifying a mask and a region, allowing for precise control over how and where the images are merged. This node is particularly useful for tasks that require overlaying one image onto another with specific masking or positioning requirements. It offers various modes to determine how the pasted image is trimmed and positioned, providing flexibility in image composition. By utilizing this node, you can achieve complex image manipulations with ease, such as creating collages or applying localized effects, all while maintaining control over the blending and positioning of the images.
This parameter represents the base image onto which another image will be pasted. It supports batch processing, allowing multiple images to be processed simultaneously. The base image serves as the canvas for the composition, and its dimensions and properties influence the final output.
This parameter is the image that will be pasted onto the base image. Like the base image, it supports batch processing. The img_paste parameter is crucial as it determines the content that will be overlaid onto the base image, and its properties can be adjusted based on the selected paste mode.
The paste_mode parameter defines how the img_paste is trimmed and positioned on the base image. It offers four options: mask
, rect_full
, rect_position
, and rect_pos_mask
. Each mode provides a different method of pasting, such as using a mask for shape control or specifying exact coordinates for placement, allowing for tailored image compositions.
This parameter dictates how multiple images are handled when either the base or paste image, or both, consist of multiple items. Options include pair_last
, pair_only
, and cross
, each offering a different approach to pairing images for processing. This flexibility ensures that the node can handle various batch processing scenarios efficiently.
An optional parameter that provides a mask for the img_paste. This mask can be used to control the shape and area of the pasted image, allowing for more complex and precise compositions. It is particularly useful in modes that require masking, such as mask
and rect_pos_mask
.
This optional parameter specifies the rectangle dimensions and position for the img_paste. It is used in modes that require precise positioning, such as rect_full
and rect_position
, enabling you to define exact areas for pasting.
The feather parameter controls the amount of edge blurring applied to the pasted image, with a range from 0 to 100 pixels. This feature helps in creating smooth transitions between the base and pasted images, enhancing the visual quality of the composition.
This optional parameter determines the method of feathering applied to the pasted image. Options include simple
and distance
, each offering a different approach to edge blurring. This allows for customization of the blending effect to suit specific artistic needs.
The output parameter is the final composite image resulting from the merging of the base and pasted images. This image reflects the specified paste mode, mask, and feathering settings, providing a seamless and visually appealing result that integrates the two input images according to the defined parameters.
mask
paste mode when you need to apply a specific shape to the pasted image, allowing for creative compositions like cutouts or overlays.feather
parameter to achieve smoother transitions between images, especially when blending images with different backgrounds or textures.multi_mode
options to efficiently handle batch processing, ensuring that your workflow remains streamlined when working with multiple images.rect_pos_mask
mode is selected without providing a mask.mask_opt
parameter when using the rect_pos_mask
mode.mask
mode was selected without a corresponding mask.mask_opt
parameter to use the mask
paste mode effectively.RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Playground, enabling artists to harness the latest AI tools to create incredible art.