Run ComfyUI Easily with InstaSD

Skip the complex setup. InstaSD helps creative professionals build workflows and deploy them to the world:

  • One-click deployment
  • Any model, any node
  • Powerful GPUs for rapid iteration
Get Started

Available Nodes

ImageBatchRepeatInterleaving

Documentation for ImageBatchRepeatInterleaving Node

Overview

The ImageBatchRepeatInterleaving node is part of the ComfyUI nodes available in the ComfyUI-KJNodes repository. This node is designed to repeat each image in a batch multiple times, interleaving them in the process. This can be particularly useful in workflows where maintaining a repetitive pattern in image sequences is desired.

Functionality

What This Node Does

The ImageBatchRepeatInterleaving node takes a batch of images and produces a new batch by repeating each image a specified number of times. The images are interleaved, meaning that each image in the original batch is immediately followed by its repetitions in the output batch.

For example, if you have a batch of 5 images (0, 1, 2, 3, 4) and you set the repeat count to 2, the resulting batch will be: 0, 0, 1, 1, 2, 2, 3, 3, 4, 4.

Inputs

  • Images: This is the main input and should be a tensor containing the batch of images you want to process.
  • Repeats: An integer indicating how many times each image in the batch should be repeated in the output.

Outputs

  • Repeated Images: A tensor containing the new batch of images with each image repeated the specified number of times. The images are interleaved in the output.

Usage in ComfyUI Workflows

How It Might Be Used

The ImageBatchRepeatInterleaving node can be used in ComfyUI workflows in various ways:

  1. Animation: When creating animations or image sequences in ComfyUI, this node can be used to ensure that each frame is displayed multiple times in succession. This can create effects like slow-motion or emphasize certain frames in a sequence.

  2. Data Augmentation: In workflows involving machine learning or neural networks, repeating images in a dataset can be beneficial for certain types of data augmentation strategies.

  3. Repetitive Patterns: If your workflow requires a repetitive pattern of images for aesthetics or other reasons, this node provides a straightforward way to generate such patterns.

Special Features or Considerations

Considerations

  • The node does not modify the image content itself; it simply repeats and interleaves the images. This means that the overall visual information in the batch remains the same, but the order and repetition of images in the output are altered.
  • The use of this node can significantly increase the size of the image batch. Users should be mindful of the memory and processing requirements, especially when working with large batches or high-resolution images.
  • Care should be taken when dealing with inputs where the dimensions or formats may not be suitable for interleaving.

Features

  • Interleaving: Unlike simple repetition, this node ensures that each set of repeated images is placed consecutively, maintaining a logical sequence in the output.
  • Configurable Repetition: The number of repetitions is fully adjustable by the user, allowing for flexibility depending on the requirements of the workflow.

By understanding and utilizing these features, users can enhance their ComfyUI workflows with the ImageBatchRepeatInterleaving node, achieving desired repetitive patterns and sequences effortlessly.