Visit ComfyUI Online for ready-to-use ComfyUI environment
Merge two latent representations into a single batch with flexible merging strategies, scaling, and cropping options for alignment.
The VHS_MergeLatents
node is designed to combine two sets of latent representations into a single cohesive batch. This node is particularly useful when you need to merge different latent batches for further processing or analysis. It offers flexibility in how the merging is performed, allowing you to choose from various strategies to match the dimensions of the latent batches. Additionally, it provides options for scaling and cropping to ensure that the latents are properly aligned and combined. This node is essential for tasks that require the integration of multiple latent spaces, such as generating composite images or videos from different sources.
This parameter represents the first set of latent representations to be merged. It is a dictionary containing the latent samples. The latents in this set will be combined with those in latents_B
according to the specified merge strategy, scale method, and crop settings.
This parameter represents the second set of latent representations to be merged. Similar to latents_A
, it is a dictionary containing the latent samples. The latents in this set will be combined with those in latents_A
based on the chosen merge strategy, scale method, and crop settings.
This parameter determines the strategy used to match the dimensions of the two latent sets. The available options are match A
, match B
, match smaller
, and match larger
. Each option specifies whether to match the dimensions of latents_A
, latents_B
, the smaller of the two, or the larger of the two, respectively. This choice impacts how the latents are scaled and aligned during the merging process.
This parameter specifies the method used for scaling the latents if their dimensions do not match. The available options are nearest-exact
, bilinear
, area
, bicubic
, and bislerp
. Each method offers a different approach to resizing the latents, affecting the quality and characteristics of the merged output.
This parameter determines whether and how cropping is applied during the scaling process. The available options are disabled
and center
. If cropping is enabled (center
), the latents will be cropped to match the target dimensions, focusing on the central region. If cropping is disabled, the latents will be scaled without cropping.
This output parameter represents the merged set of latent representations. It is a dictionary containing the combined latent samples from latents_A
and latents_B
, aligned and scaled according to the specified parameters. This merged latent can be used for further processing or analysis.
This output parameter indicates the total number of latent samples in the merged set. It provides a count of the combined latents from both latents_A
and latents_B
, giving you an idea of the size of the merged batch.
scale_method
that matches the characteristics of your data. For example, bicubic
scaling is often preferred for images due to its smooth interpolation.match smaller
or match larger
strategies to maintain a balance between the two sets.center
cropping option to focus on the central region of the latents during scaling.latents_A
and latents_B
cannot be aligned even after scaling.merge_strategy
, scale_method
, and crop
settings are appropriate for the dimensions of your latent sets. Adjust these parameters to achieve compatible dimensions.samples
key with the appropriate tensor data. Ensure that both latents_A
and latents_B
follow this structure.scale_method
from the available options: nearest-exact
, bilinear
, area
, bicubic
, or bislerp
. Ensure that the selected method is appropriate for your data.© Copyright 2024 RunComfy. All Rights Reserved.