Latent Composite:
The LatentComposite node is designed to combine two latent images into a single composite image. This node allows you to overlay one latent image (source) onto another (destination) at a specified position, providing flexibility in creating complex compositions. The node supports optional resizing of the source image to fit the destination and can also utilize a mask to control the blending of the two images. This functionality is particularly useful for AI artists looking to merge different elements seamlessly within the latent space, enabling more creative and intricate designs.
Latent Composite Input Parameters:
destination
The destination parameter represents the base latent image onto which the source image will be overlaid. This is the primary image that will be modified by the composite operation. It is of type LATENT.
source
The source parameter is the latent image that will be overlaid onto the destination image. This image can be resized and positioned according to the specified parameters. It is of type LATENT.
x
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.
y
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.
resize_source
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.
mask
The mask parameter is optional and allows you to provide a mask that controls the blending of the source image onto the destination image. The mask can define areas of transparency and opacity, enabling more precise and controlled composites. It is of type MASK.
Latent Composite Output Parameters:
LATENT
The output of the LatentComposite node is a single composite latent image. This image is the result of overlaying the source image onto the destination image according to the specified parameters. The output retains the latent format, allowing for further processing or decoding into a visible image.
Latent Composite Usage Tips:
- To achieve seamless blending, use a mask that gradually transitions from opaque to transparent.
- Experiment with different
xandyvalues to position the source image precisely where you want it on the destination image. - If the source image is significantly larger or smaller than the destination, consider enabling
resize_sourceto ensure a better fit.
Latent Composite Common Errors and Solutions:
"Invalid mask format"
- Explanation: The provided mask is not in the correct format or type.
- Solution: Ensure that the mask is of type
MASKand correctly formatted.
"Source and destination dimensions mismatch"
- Explanation: The source and destination images have incompatible dimensions.
- Solution: Enable the
resize_sourceparameter to resize the source image to match the destination dimensions.
"x or y value out of bounds"
- Explanation: The specified
xoryposition is outside the allowable range. - Solution: Adjust the
xandyvalues to be within the range defined byMAX_RESOLUTION.
