EasyUse/Pipegenerated

Pipe Batch Index(pipeBatchIndex)

Pipe Batch Index selects a contiguous slice from the batch dimension of the latent samples carried by a PIPE_LINE and returns a new pipe containing only that sl...

pipe Batch Index

pipe
pipe
batch_index
0
length
1
Easy Use

Pipe Batch Index selects a contiguous slice from the batch dimension of the latent samples carried by a PIPE_LINE and returns a new pipe containing only that slice. All other components of the pipe — model, conditioning, VAE, and any additional data — are passed through unchanged. This is useful when a pipe was created with a large batched latent and you want to process or preview a specific subset of the batch.

Inputs

  • pipe: The PIPE_LINE containing the latent batch to slice. The node reads the latent samples from the pipe, slices them, and copies every other pipe field into the returned pipe.
  • batch_index: The zero-based index of the first item in the batch to keep.
    Default: 0
    Minimum: 0
    Maximum: 63
  • length: The number of consecutive batch items to keep, starting at batch_index.
    Default: 1
    Minimum: 1
    Maximum: 64

Outputs

  • pipe: A PIPE_LINE with the same contents as the input pipe, except the latent samples are replaced by the sliced batch. If the selected range extends beyond the available batch size, the behavior follows ComfyUI's standard tensor slicing rules.

Usage Notes

  • Use batch_index and length together to isolate a sub-batch. For example, batch_index = 0 and length = 4 keeps the first four items from the batch.
  • Since the node only affects the latent samples inside the pipe, conditioning and other pipe data remain aligned with the original full batch. If you later use the returned pipe for sampling, keep in mind that conditioning was not resliced.
  • The input limits make this node suitable for moderate batch sizes; for very large batches you may need to slice the latent directly with a dedicated latent batch node instead.

Comments

Sign in with GitHub to join the discussion.

Loading comments…