Visit ComfyUI Online for ready-to-use ComfyUI environment
Facilitates combining latent images with precise control using masks for overlaying and resizing.
The LatentCompositeMasked
node is designed to facilitate the combination of two latent images, allowing you to overlay one image onto another at a specified position. This node is particularly useful for tasks that require precise control over image composition in the latent space, such as inpainting or creating complex image manipulations. By leveraging a mask, you can define specific areas where the source image should be applied to the destination image, providing a high degree of flexibility and control. The node also offers an option to resize the source image to fit the destination, ensuring seamless integration.
The destination
parameter represents the latent image that will serve as the base or background for the composition. This is where the source image will be overlaid. It is of type LATENT
.
The source
parameter is the latent image that you want to overlay onto the destination image. This image will be placed at the specified coordinates on the destination image. It is of type LATENT
.
The x
parameter specifies the horizontal position where the top-left corner of the source image will be placed on the destination image. It is an integer value with a default of 0, a minimum of 0, and a maximum defined by MAX_RESOLUTION
, with steps of 8.
The y
parameter specifies the vertical position where the top-left corner of the source image will be placed on the destination image. It is an integer value with a default of 0, a minimum of 0, and a maximum defined by MAX_RESOLUTION
, with steps of 8.
The resize_source
parameter is a boolean that determines whether the source image should be resized to fit the destination image. If set to True
, the source image will be resized; if False
, it will retain its original dimensions. The default value is False
.
The mask
parameter is optional and allows you to specify a mask that defines the areas where the source image should be applied to the destination image. It is of type MASK
. If no mask is provided, the source image will be applied uniformly.
The output is a single LATENT
type parameter, which is the resulting composite image. This image is the combination of the destination and source images, overlaid according to the specified parameters and mask.
x
and y
parameters.mask
parameter to apply the source image selectively, which is useful for tasks like inpainting or adding specific details to certain areas of the destination image.resize_source
to True
to ensure a seamless overlay.x
and y
coordinates place the source image outside the bounds of the destination image.x
and y
coordinates to ensure the source image fits within the destination image boundaries.resize_source
parameter is set correctly.© Copyright 2024 RunComfy. All Rights Reserved.