Mux

This function block collects multiple input values and bundles them into a single list output. Use it when you want to group several signals or images together and pass them downstream as one packaged value.

πŸ“₯ Inputs

Input 1 β€” Generic input socket Input 2 β€” Generic input socket (Additional inputs can be added up to 20 using the control below)

πŸ“€ Outputs

Generic β€” A single output that contains a list with the values from all input sockets (order preserved)

πŸ•ΉοΈ Controls

Input size β€” Choose how many input sockets the block provides (2–20). Changing this control will add or remove input sockets so you can match the number of items you want to bundle.

🎯 Features

  • Flexible input count: pick 2 to 20 inputs to suit your workflow.

  • Ordered bundling: inputs are collected in left-to-right order into a single list output.

  • Generic support: works with images, numbers, text, lists, or any generic data type.

πŸ“ Usage Instructions

  1. Set the desired number of inputs with the Input size control.

  2. Connect the values you want to group into each Input X socket.

  3. The block outputs a single Generic list containing all input values in order. Connect that output to downstream blocks that accept lists or generic data.

πŸ“Š Evaluation

When the scenario runs, the block reads each connected input socket and produces a single list on its output. Unconnected sockets will contribute whatever default or empty value your system uses for that socket type.

πŸ’‘ Tips and Tricks

  • To split the bundled list back into individual items, pair this block with Demux or Get Element.

  • Use with Batch Processing or Batch Concatenation when preparing grouped data for batch workflows.

  • If you are grouping images, connect the output to Collage Images, Image Concatenate, or Multi Image Write to create combined visuals or save multiple images at once.

  • To convert grouped data into log-friendly format, pipe the output into Data to JSON or CSV Export.

  • Filter or sanitize the list before downstream use with Exclude Nones or Replace None to remove or replace empty entries.

  • For quick debugging or preview, send individual list elements to Show Image (for images) or to a logging block.

πŸ› οΈ Troubleshooting

  • If you accidentally reduce the Input size and lose a connection, re-scan or reconnect the source to the new sockets.

  • If downstream blocks do not accept the bundled output, check whether they expect a single item per input rather than a list; use Demux or Get Element to adapt the data shape.

  • If some list entries are empty, consider using Exclude Nones or Replace None to clean the list before further processing.

Last updated

Was this helpful?