> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# LatentConcat - ComfyUI Built-in Node Documentation

> The LatentConcat node combines two latent samples by joining them together along a chosen dimension.

The LatentConcat node combines two latent samples by joining them together along a chosen dimension. It takes two latent inputs and concatenates them along the x, y, or t axis, with the option to control which sample comes first. The node automatically adjusts the batch size of the second input to match the first before performing the concatenation.

## Inputs

| Parameter | Description | Data Type | Required | Range |
| - | - | - | - | - |
| `samples1` | The first latent sample to concatenate | LATENT | Yes | - |
| `samples2` | The second latent sample to concatenate | LATENT | Yes | - |
| `dim` | The dimension along which to concatenate the latent samples. Positive values (x, y, t) place samples1 before samples2 in the result. Negative values (-x, -y, -t) place samples2 before samples1. The dimension mapping is: x = width, y = height, t = time/frames | COMBO | Yes | `"x"`<br />`"-x"`<br />`"y"`<br />`"-y"`<br />`"t"`<br />`"-t"` |

**Note:** The second latent sample (`samples2`) is automatically repeated as needed to match the batch size of the first latent sample (`samples1`) before concatenation.

## Outputs

| Output Name | Description | Data Type |
| - | - | - |
| `output` | The concatenated latent samples resulting from combining the two input samples along the specified dimension | LATENT |

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/LatentConcat/en.md)

***

**Source fingerprint (SHA-256):** `dfe27f76ad12e16623d62c9e7f0b2772df6ecadb543a4eee430bc38ab04a12f2`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.