Repeat Latents π₯π ₯π π ’(RepeatLatents)
From a technical implementation perspective, this node receives a standard LATENT dictionary input, which contains tensor key-value pairs such as `samples`.
Repeat Latents
The Repeat Latents π₯π
₯π
π
’ node, from a technical implementation perspective, receives a standard LATENT dictionary input containing tensor key-values such as samples.
The Repeat Latents node is a tool for duplicating and extending latent space data. Its core function is to receive a set of latent representations and repeat/concatenate their content by a specified multiplier, thereby generating a longer sequence. This operation primarily serves workflows that require batch or sequential processing of latent data.
Node Functionality
From a technical implementation perspective, this node receives a standard LATENT dictionary input containing tensor key-values such as samples. It iterates through all one-dimensional tensors in the dictionary that match the length of the primary sample and repeats/concatenates these tensors along dimension 0 (the batch dimension). Finally, it outputs a new, length-extended LATENT dictionary and simultaneously returns the total count of the concatenated tensors (i.e., the new batch size).
Node Parameter Description - Repeat Latents π₯π ₯π π ’
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
latents | LATENT | Yes | - | - | : The input latent representation data to be repeated. Type is LATENT dictionary. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Value Range/Options | Description |
|---|---|---|---|---|---|
multiply_by | INT | Yes | 1 | 1 - BIGMAX (Step: 1) | : Specifies how many times to repeat the input data. Value range is 1 to a very large number, with a step of 1. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| LATENT | LATENT | : The output new latent representation data after repetition and concatenation. |
| count | INT | : The total number of samples (batch size) in the new latent data. |
Usage Scenarios
This node is very useful in workflows for video generation or batch image processing. For example, when you have a latent representation of a single frame image generated by a VAE encoder but need to generate a static video composed of multiple frames of identical content, you can use this node to repeat that latent representation multiple times. Then, pass the output to a subsequent sampler for batch decoding, thereby efficiently generating the sequence.
Notes
Please note that this node only performs the repeat operation on one-dimensional tensors within the LATENT dictionary that match the length of the primary sample. The multiply_by parameter must be an integer greater than or equal to 1. Excessively large repetition multipliers may lead to insufficient GPU memory.
Repeat Latents π₯π ₯π π ’ Node Source Code Link
The Repeat Latents π₯π ₯π π ’ node is from the ComfyUI-VideoHelperSuite node package.
Comments
Sign in with GitHub to join the discussion.