Video Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’generated

Unbatch πŸŽ₯πŸ…₯πŸ…—πŸ…’(Unbatch)

This node technically supports multiple data types, including PyTorch tensors (torch

Unbatch

batched
unbatched
VideoHelperSuite

The Unbatch node is a utility tool within the Video Helper Suite. Its core function is to split or merge a batched input data stream, restoring it to a single data stream. It is primarily used to process data that has been packaged into batches within video or image sequence processing workflows, facilitating subsequent frame-by-frame or independent operations.

Node Functionality

This node technically supports multiple data types, including PyTorch tensors (torch.Tensor), dictionaries containing specific keys (such as 'samples' or 'waveform'), and other iterable objects. Its core mechanism determines the merging strategy by inspecting the type of the first element in the input data: for tensors, it uses torch.cat for concatenation; for specific dictionaries, it merges the tensor data within them; for other types, it uses accumulation operations for merging.

Node Parameter Description - Unbatch πŸŽ₯πŸ…₯πŸ…—πŸ…’

Connection Inputs (Inputs)

Parameter NameData TypeRequiredDefault ValueValue Range/OptionsDescription
batched*Yes--Input parameter batched: Receives a list of batched data. The node will merge or split it into a continuous data stream. The input can be a list of any type, with no specific value range restrictions.

Usage Scenarios

In a typical video frame post-processing workflow, you might first use a Batch node to package multiple image frames, then perform batch upscaling or filter processing. After processing is complete, you can use the Unbatch node to split this batch of processed image frames apart, facilitating frame-by-frame saving or independent inter-frame synthesis operations.

Notes

Please note that this node requires the input to be in the form of a list (controlled by INPUT_IS_LIST = True). This means you typically need to connect a node that outputs a list (such as a Batch node) as its input. For dictionary-type inputs, the node will remove any potentially existing 'batch_index' key.

The Unbatch πŸŽ₯πŸ…₯πŸ…—πŸ…’ node is from the ComfyUI-VideoHelperSuite node package.

Comments

Sign in with GitHub to join the discussion.

Loading comments…