Video Helper Suite πŸŽ₯πŸ…₯πŸ…—πŸ…’/batched nodesgenerated

VAE Encode Batched πŸŽ₯πŸ…₯πŸ…—πŸ…’(VAEEncodeBatched)

This node receives pixel data of type IMAGE and a VAE model as inputs

VAE Encode Batched

pixels
vae
LATENT
per_batch
16
VideoHelperSuite

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 NameData TypeRequiredDefault ValueRange/OptionsDescription
pixelsIMAGEYes--pixels (input parameter): The sequence of images to be encoded, provided as a tensor of type IMAGE.
vaeVAEYes--vae (input parameter): The Variational Autoencoder model used to perform the encoding task.

Control Parameters (Parameters)

Parameter NameData TypeRequiredDefault ValueRange/OptionsDescription
per_batchINTYes16-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 NameData TypeDescription
LATENTLATENTLATENT (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.

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

Comments

Sign in with GitHub to join the discussion.

Loading comments…