Video Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’/imagegenerated

Repeat Images πŸŽ₯πŸ…₯πŸ…—πŸ…’(RepeatImages)

From a technical implementation perspective, this node takes a batch of images in PyTorch Tensor format as input and processes it through torch。

Repeat Images

images
IMAGE
count
multiply_by
INT
VideoHelperSuite

The Repeat Images πŸŽ₯πŸ…₯πŸ…—πŸ…’ node, from a technical implementation perspective, receives a batch of images in PyTorch Tensor format as input and uses torch

The Repeat Images node is a tool for image sequence processing. Its core function is to receive a batch of images (of type IMAGE) and repeat its content a specified number of times. The node extends the sequence length by replicating the input image tensor and outputs a new, longer image sequence along with the total frame count of that sequence.

Node Function

From a technical implementation perspective, this node receives a batch of images in PyTorch Tensor format as input and concatenates the original image data along the batch dimension (dim=0) using the torch.cat operation. It supports the standard ComfyUI IMAGE data type. Its internal mechanism involves creating a list containing multiply_by copies of the original image data and then merging them into a new tensor. Finally, the node outputs this expanded image tensor and the new batch size.

Node Parameter Description - Repeat Images πŸŽ₯πŸ…₯πŸ…—πŸ…’

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
imagesIMAGEYes--images (input parameter): The input batch or sequence of images to be repeated. Type is IMAGE.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
multiply_byINTYes11 - BIGMAX (Step: 1)multiply_by (input parameter): Specifies the number of times the image sequence needs to be repeated. Valid range is 1 to BIGMAX, with a step of 1. Default value is 1.

Output

Parameter NameData TypeDescription
IMAGEIMAGEIMAGE (output parameter): Outputs the new image sequence generated after repetition and concatenation.
countINTcount (output parameter): Outputs the total number of image frames (i.e., batch size) contained in the new image sequence.

Usage Scenarios

In practical workflows, this node is commonly used in scenarios requiring the extension or looping of an image sequence. For example, when creating videos or animations, if a keyframe sequence needs to be played repeatedly multiple times to extend its duration, that sequence can be fed into this node with the multiply_by parameter set to the desired number of repetitions. The resulting longer sequence can be directly used by subsequent video encoding or frame interpolation nodes.

Notes

When using this node, note that it only performs simple data replication and does not modify or interpolate the image content in any way. The repetition operation linearly increases VRAM usage and the processing time of subsequent nodes. Therefore, the repetition count should be set carefully based on actual needs to avoid generating excessively large image batches.

The Repeat Images πŸŽ₯πŸ…₯πŸ…—πŸ…’ node is from the ComfyUI-VideoHelperSuite node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…