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.
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHubThe Batch Images/Masks/Latents node combines multiple inputs of the same type into a single batch. It automatically detects whether the inputs are images, masks, or latent representations and uses the appropriate batching method. This is useful for preparing multiple items for processing by nodes that accept batched inputs.
Inputs
| Parameter | Data Type | Required | Range | Description |
|---|---|---|---|---|
inputs | IMAGE, MASK, or LATENT | Yes | 1 to 50 inputs | A dynamic list of inputs to be combined into a batch. You can add between 1 and 50 items. All items must be of the same type (all images, all masks, or all latents). |
inputs list. All subsequent items must match this type. The node will fail if you try to mix different data types.
Additional behavior based on input type:
- Images: When batching images, the node pads images with fewer color channels to match the maximum channel count among all inputs (padding value is 1.0). It also resizes all images to match the dimensions of the first image using bilinear interpolation.
- Masks: When batching masks, the node resizes all masks to match the dimensions of the first mask using bilinear interpolation.
- Latents: When batching latents, the node reshapes all latent tensors to match the dimensions of the first latent’s samples. It also combines the
batch_indexvalues from each latent, extending the list with sequential indices if a latent lacks abatch_index.
Outputs
| Output Name | Data Type | Description |
|---|---|---|
output | IMAGE, MASK, or LATENT | A single batched output. The data type matches the input type (batched IMAGE, batched MASK, or batched LATENT). |
Source fingerprint (SHA-256):
9f82b036c99577ebcda6de647c662def572ae1f01bd78dca1a0ab32f4698e09e