> ## Documentation Index
> Fetch the complete documentation index at: https://docs.comfy.org/llms.txt
> Use this file to discover all available pages before exploring further.

# ResolutionBucket - ComfyUI Built-in Node Documentation

> Complete documentation for the ResolutionBucket node in ComfyUI. Learn its inputs, outputs, parameters and usage.

> This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! [Edit on GitHub](https://github.com/Comfy-Org/embedded-docs/blob/main/comfyui_embedded_docs/docs/ResolutionBucket/en.md)

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

| Parameter      | Data Type    | Required | Range | Description                                             |
| -------------- | ------------ | -------- | ----- | ------------------------------------------------------- |
| `latents`      | LATENT       | Yes      | N/A   | List of latent dicts to bucket by resolution.           |
| `conditioning` | CONDITIONING | Yes      | N/A   | List of conditioning lists (must match latents length). |

**Note:** The number of items in the `latents` list must exactly match the number of items in the `conditioning` list. 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.

## Outputs

| Output Name    | Data Type    | Description                                              |
| -------------- | ------------ | -------------------------------------------------------- |
| `latents`      | LATENT       | List of batched latent dicts, one per resolution bucket. |
| `conditioning` | CONDITIONING | List of condition lists, one per resolution bucket.      |
