ComfyUI > Nodes > ComfyUI > Latent Composite

ComfyUI Node: Latent Composite

Class Name

LatentComposite

Category
latent
Author
ComfyAnonymous (Account age: 598days)
Extension
ComfyUI
Latest Updated
2024-08-12
Github Stars
45.85K

How to Install ComfyUI

Install this extension via the ComfyUI Manager by searching for ComfyUI
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Latent Composite Description

Combine latent images into composite image, overlay, resize, mask blending for AI artists' creative compositions.

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 x and y values 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_source to 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 MASK and correctly formatted.

"Source and destination dimensions mismatch"

  • Explanation: The source and destination images have incompatible dimensions.
  • Solution: Enable the resize_source parameter to resize the source image to match the destination dimensions.

"x or y value out of bounds"

  • Explanation: The specified x or y position is outside the allowable range.
  • Solution: Adjust the x and y values to be within the range defined by MAX_RESOLUTION.

Latent Composite Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.