Debatch

This function block disables batch processing for the current variable and demultiplexes (demuxes) a list/batch input into separate outputs so downstream blocks receive individual elements.

πŸ“₯ Inputs

Batch This input socket accepts a list or batch of values (for example: a list of images, numbers, shapes or generic items). The block expects the batch to be provided here.

πŸ“€ Outputs

Output 1 Output 2

These output sockets provide the individual elements extracted from the incoming batch in sequential order. If the batch contains fewer elements than available outputs, remaining outputs will be left at default/empty values. If the batch contains more elements than available outputs, the first elements are provided to the outputs in order.

πŸ•ΉοΈ Controls

This block has no interactive controls or user widgets.

βš™οΈ Running mechanism

  • When a valid batch (list) is connected to the Batch input, the block splits the batch and emits elements through the output sockets in order.

  • If the input is missing or invalid, the block will show an error/invalid state in the UI and provide default outputs to indicate no valid data is available.

  • Use this block when you need to turn a grouped list of items into individual streams so other blocks can process each item independently.

🎯 Features

  • Simple demultiplexing of batch/list data into separate outputs.

  • Works with any generic data type (images, numbers, shapes, etc.).

  • Safe fallback behavior when input is not connected or invalid.

πŸ“ Usage instructions

  1. Provide a batch or list of items to the Batch input.

  2. Connect downstream blocks to Output 1 and/or Output 2 to receive individual elements.

  3. If you expect varying batch sizes, add logic or checking blocks downstream to handle missing or extra elements gracefully.

πŸ’‘ Tips and Tricks

  • Combine with Batch Processing to switch between batched and per-item processing: produce a batch with Batch Processing then use this block to process items individually.

  • Use Get Batch Size or Get Element before or after this block to inspect batch length or access specific elements.

  • Reassemble processed items using Batch Concatenation or Mux when you need to create a single batch/list again.

  • Pair with image-focused blocks: feed a batch of images into this block, then connect each output to blocks such as Show Image, Image Logger, Find Object, Object Detection, or Mask Detection for per-image analysis and saving.

  • When working with optional values, chain Exclude Nones after this block to remove empty elements before further processing.

  • If you need to limit or transform the element stream, use it together with Get Element and logic blocks (for example: filtering, counters) to control which elements are passed on.

πŸ› οΈ Troubleshooting

  • No outputs update: verify that the Batch input is connected and contains a list of items.

  • Unexpected empty outputs: check the batch size; if it has fewer elements than the number of outputs, some outputs will be empty by design. Use Get Batch Size to confirm the incoming batch length.

  • Downstream errors: ensure downstream blocks accept the specific element type (image, number, shape, etc.) emitted by this block. Use type-conversion or validation blocks if needed.

Last updated

Was this helpful?