Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates seamless overlay of two images with optional masking and switch control for conditional processing.
The ImageCompositeMaskedWithSwitch
node is designed to facilitate the seamless combination of two images, allowing you to overlay a source image onto a destination image at specified coordinates. This node is particularly useful for creating complex image compositions where precise placement and optional masking are required. One of its standout features is the ability to enable or disable the operation through a switch, providing flexibility in workflows where conditional image processing is needed. By leveraging this node, you can achieve intricate image overlays with optional resizing and masking, making it a powerful tool for AI artists looking to enhance their creative projects.
The destination
parameter specifies the base image onto which the source image will be overlaid. This is the primary canvas for the composite operation. The input type is IMAGE
.
The source
parameter defines the image that will be overlaid onto the destination image. This image can be resized and masked as per the other parameters. The input type is IMAGE
.
The x
parameter determines the horizontal position (in pixels) where the top-left corner of the source image will be placed on the destination image. It accepts integer values with a default of 0, a minimum of 0, and a maximum of 16384.
The y
parameter sets the vertical position (in pixels) where the top-left corner of the source image will be placed on the destination image. It accepts integer values with a default of 0, a minimum of 0, and a maximum of 16384.
The resize_source
parameter is a boolean that indicates whether the source image should be resized to fit within the destination image. The default value is False
.
The mask
parameter is optional and allows you to specify a mask image that defines the transparency levels for the source image. This mask can be used to create more complex and nuanced composites. The input type is MASK
.
The enabled
parameter is a boolean switch that controls whether the composite operation is performed. If set to False
, the node will bypass the operation. The default value is True
.
The output is a single IMAGE
that represents the result of the composite operation. This image is the destination image with the source image overlaid at the specified coordinates, optionally resized and masked as per the input parameters.
The output also includes a BOOLEAN
value that reflects the state of the enabled
parameter. This can be useful for conditional workflows where the composite operation may be toggled on or off.
x
and y
coordinates are within the bounds of the destination image to avoid unexpected results.resize_source
parameter to fit the source image within the destination image if the source image is larger.mask
parameter to create more intricate and visually appealing composites by controlling the transparency of the source image.enabled
switch to conditionally apply the composite operation, which can be useful in dynamic workflows where certain conditions dictate whether the operation should be performed.<image>
enabled
parameter was set to False
.enabled
parameter to True
if you want the composite operation to be executed.© Copyright 2024 RunComfy. All Rights Reserved.