VAE Encode Batched π₯π ₯π π ’(VAEEncodeBatched)
This node receives pixel data of type IMAGE and a VAE model as inputs
VAE Encode Batched
The VAE Encode Batched π₯π ₯π π ’ node receives pixel data of type IMAGE and a VAE model as input.
The VAE Encode Batched node is a specialized tool for batch encoding images into latent space representations. Its core function is to efficiently process large numbers of images by encoding them in batches, optimizing memory usage and preventing system resource exhaustion that can occur from processing too many images at once.
Node Function
This node receives pixel data of type IMAGE and a VAE model as input. Its internal mechanism splits the input image sequence into batches of a user-specified size, then sequentially calls the VAE model's encoder to convert each batch of RGB images into a latent representation in LATENT format. It supports processing image sequences of arbitrary length and provides processing status feedback via a progress bar.
Node Parameter Description - VAE Encode Batched π₯π ₯π π ’
Connection Inputs (Inputs)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
pixels | IMAGE | Yes | - | - | pixels (input parameter): The sequence of images to be encoded, provided as a tensor of type IMAGE. |
vae | VAE | Yes | - | - | vae (input parameter): The Variational Autoencoder model used to perform the encoding task. |
Control Parameters (Parameters)
| Parameter Name | Data Type | Required | Default Value | Range/Options | Description |
|---|---|---|---|---|---|
per_batch | INT | Yes | 16 | - | per_batch (input parameter): Specifies the number of images to process per batch. The default value is 16, and the minimum value is 1. |
Output
| Parameter Name | Data Type | Description |
|---|---|---|
| LATENT | LATENT | LATENT (output parameter): Outputs the latent space representation samples obtained after encoding. |
Usage Scenarios
This node is particularly useful in workflows involving video generation or image sequence processing. For example, when you have a video composed of multiple frames (an IMAGE sequence) and need to convert all of them into latent representations for subsequent latent space operations or generation, you can connect this node and set an appropriate per_batch value to balance processing speed and memory usage.
Notes
Please note that the node's processing speed and quality depend on the connected VAE model. An excessively large batch value (per_batch) may lead to insufficient VRAM, while an excessively small value will reduce processing efficiency.
VAE Encode Batched π₯π ₯π π ’ Node Source Code Link
The VAE Encode Batched π₯π ₯π π ’ node is from the ComfyUI-VideoHelperSuite node package.
Comments
Sign in with GitHub to join the discussion.