ComfyUI > Nodes > ComfyUI > LatentConcat

ComfyUI Node: LatentConcat

Class Name

LatentConcat

Category
latent/advanced
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

LatentConcat Description

Merge latent samples for diverse representations and creative exploration in AI art.

LatentConcat:

The LatentConcat node is designed to seamlessly merge two sets of latent samples along a specified dimension, allowing for the creation of complex and varied latent representations. This node is particularly useful in scenarios where you want to combine different latent features or extend the dimensionality of your latent space. By concatenating latent samples, you can explore new creative possibilities and generate more diverse outputs. The node provides flexibility in choosing the dimension along which the concatenation occurs, enabling you to control the structure and orientation of the resulting latent space. This capability is essential for advanced latent manipulation and can be a powerful tool in the hands of AI artists looking to push the boundaries of their creative projects.

LatentConcat Input Parameters:

samples1

samples1 is the first set of latent samples that you want to concatenate. This parameter serves as one of the primary inputs and forms the initial part of the concatenated output. The structure and content of samples1 significantly influence the final result, as it determines the starting point of the concatenation process.

samples2

samples2 is the second set of latent samples to be concatenated with samples1. This parameter is crucial as it provides the additional latent features or dimensions that will be appended to samples1. The alignment and compatibility of samples2 with samples1 are essential for a successful concatenation.

dim

dim specifies the dimension along which the concatenation will occur. The options available are x, -x, y, -y, t, and -t, representing different axes or directions in the latent space. Choosing the correct dimension is vital as it dictates how the latent samples are combined and can affect the orientation and structure of the resulting latent representation.

LatentConcat Output Parameters:

Latent Output

The output of the LatentConcat node is a new set of latent samples that result from the concatenation of samples1 and samples2 along the specified dimension. This output retains the characteristics of both input samples while extending the latent space, providing a richer and more complex representation. The concatenated output can be used for further processing or as input to other nodes in your workflow, enabling you to build upon the combined latent features.

LatentConcat Usage Tips:

  • Ensure that samples1 and samples2 are compatible in terms of batch size and other dimensions not involved in the concatenation to avoid errors.
  • Experiment with different dimensions (x, y, t) to see how the orientation of the concatenation affects your results, as this can lead to unique and unexpected creative outcomes.
  • Use the LatentConcat node in conjunction with other latent manipulation nodes to create complex workflows that enhance the diversity and richness of your generated content.

LatentConcat Common Errors and Solutions:

Dimension mismatch error

  • Explanation: This error occurs when samples1 and samples2 have incompatible dimensions for concatenation along the specified axis.
  • Solution: Ensure that the dimensions of samples1 and samples2 match in all axes except the one specified for concatenation. You may need to adjust the shape of one or both inputs to align them properly.

Invalid dimension selection

  • Explanation: This error arises when an invalid or unsupported dimension is specified for the dim parameter.
  • Solution: Double-check the dim parameter to ensure it is one of the supported options (x, -x, y, -y, t, -t). Correct any typos or incorrect values to resolve the issue.

LatentConcat Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

LatentConcat