Skip to main content
This node organizes a list of latent images and their corresponding conditioning data by their resolution. It groups together items that share the same height and width, creating separate batches for each unique resolution. This process is useful for preparing data for efficient training, as it allows models to process multiple items of the same size together.

Inputs

Note: Both inputs are list-type inputs, meaning the node receives a list of items for each. The number of items in the latents list must exactly match the number of items in the conditioning list; if the counts do not match, the node raises an error. Each latent dictionary can contain a batch of samples, and the corresponding conditioning list must contain a matching number of conditioning items for that batch, since each sample in the batch is paired with its own conditioning entry. Latent samples may have a shape of (B, C, H, W) for images or (B, T, C, H, W) for videos; the node groups them by height and width only.

Outputs

Note: Both outputs are list-type outputs. Each output list contains one entry per unique resolution (height and width) found in the input, in the order the resolutions were first encountered. Latents within each bucket are stacked along a new batch dimension.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 11687f9916895136c7c5b8146cd7519cbf6c296720e453bac52fe4da237403cd