ComfyUI > Nodes > DJZ-Nodes > Batch Offset

ComfyUI Node: Batch Offset

Class Name

BatchOffset

Category
image/batch
Author
DriftJohnson (Account age: 4052days)
Extension
DJZ-Nodes
Latest Updated
2025-04-25
Github Stars
0.04K

How to Install DJZ-Nodes

Install this extension via the ComfyUI Manager by searching for DJZ-Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter DJZ-Nodes 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

Batch Offset Description

Manipulate batch image order with cyclic shift for dynamic reordering without altering images.

Batch Offset:

The BatchOffset node is designed to manipulate a batch of images by shifting their order based on a specified offset value. This node is particularly useful when you need to rearrange images within a batch, such as for data augmentation or to achieve a specific sequence for processing. By applying an offset, you can cyclically shift the images, meaning that images moved out of one end of the batch reappear at the other end. This functionality is essential for tasks that require a dynamic reordering of images without altering the images themselves. The node ensures that the batch remains intact, maintaining the same number of images, while providing flexibility in their arrangement.

Batch Offset Input Parameters:

images

The images parameter expects a batch of images as input. This parameter is crucial as it represents the collection of images that you want to reorder. The node requires that the input is indeed a batch, meaning it should have a minimum of four dimensions, with the first dimension representing the batch size. If the batch size is less than or equal to one, the node will not perform any operation and will issue a warning. This parameter is essential for the node's operation, as it defines the dataset on which the offset will be applied.

offset

The offset parameter is an integer that determines how much the images in the batch should be shifted. The offset can be positive or negative, allowing for forward or backward shifts, respectively. The effective offset is calculated using the modulo operation with the batch size, ensuring that the shift wraps around the batch. The parameter has a default value of -1, which means each image is moved one position forward, and the first image is wrapped to the end. The offset value can range from -100 to 100, providing flexibility in how the images are reordered. This parameter is key to customizing the sequence of images in the batch.

Batch Offset Output Parameters:

IMAGE

The output of the BatchOffset node is a batch of images, denoted as IMAGE. This output represents the reordered batch after applying the specified offset. The function of this output is to provide the same set of images but in a new order, as determined by the offset parameter. The importance of this output lies in its ability to facilitate tasks that require specific image sequences, such as temporal data analysis or creative image processing workflows. The output maintains the integrity of the original images, ensuring that only their order is altered.

Batch Offset Usage Tips:

  • Ensure that the input batch contains multiple images, as the node is designed to work with batches larger than one. If the batch size is one or less, the node will not perform any operation.
  • Experiment with different offset values to achieve the desired image sequence. Remember that negative offsets shift images forward, while positive offsets shift them backward.

Batch Offset Common Errors and Solutions:

Warning: Batch Offset node requires a batch of multiple images

  • Explanation: This warning occurs when the input batch contains only one image or is not a valid batch.
  • Solution: Ensure that the input to the node is a batch with more than one image. Check the dimensions of your input to confirm it meets the batch requirements.

Batch Offset Related Nodes

Go back to the extension to check out more related nodes.
DJZ-Nodes
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 Playground, enabling artists to harness the latest AI tools to create incredible art.