ComfyUI > Nodes > WAS Node Suite > Latent Batch

ComfyUI Node: Latent Batch

Class Name

Latent Batch

Category
WAS Suite/Latent
Author
WASasquatch (Account age: 4688days)
Extension
WAS Node Suite
Latest Updated
2024-08-25
Github Stars
1.07K

How to Install WAS Node Suite

Install this extension via the ComfyUI Manager by searching for WAS Node Suite
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter WAS Node Suite in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Latent Batch Description

Combines latent samples into a single batch for seamless integration in AI art projects.

Latent Batch:

The Latent Batch node is designed to combine two sets of latent samples into a single batch. This is particularly useful in scenarios where you need to merge different latent representations for further processing or analysis. By concatenating the samples along the batch dimension, this node ensures that the combined output maintains the integrity and structure of the original latent data. The primary goal of this node is to facilitate the seamless integration of multiple latent samples, making it easier to handle and manipulate large sets of latent data in your AI art projects.

Latent Batch Input Parameters:

samples1

samples1 is the first set of latent samples that you want to combine. This parameter expects a latent data type, which typically contains multi-dimensional arrays representing the latent space of your data. The shape and structure of these samples are crucial as they need to be compatible with the second set of samples for successful concatenation.

samples2

samples2 is the second set of latent samples to be combined with samples1. Similar to samples1, this parameter also expects a latent data type. If the dimensions of samples2 do not match those of samples1, the node will automatically upscale samples2 to ensure compatibility, using bilinear interpolation and center alignment.

Latent Batch Output Parameters:

LATENT

The output parameter is a single combined set of latent samples, labeled as LATENT. This output retains the structure of the input samples but concatenates them along the batch dimension. The resulting batch includes all the samples from both samples1 and samples2, along with an updated batch_index that reflects the new combined batch.

Latent Batch Usage Tips:

  • Ensure that the dimensions of samples1 and samples2 are compatible or can be made compatible through upscaling to avoid errors during concatenation.
  • Use this node when you need to merge different latent representations for tasks such as batch processing, data augmentation, or model training.
  • If you encounter issues with mismatched dimensions, consider preprocessing your latent samples to have similar shapes before using this node.

Latent Batch Common Errors and Solutions:

ValueError: "At least one input latent must be provided."

  • Explanation: This error occurs when neither samples1 nor samples2 is provided as input to the node.
  • Solution: Ensure that you provide at least one set of latent samples for the node to process. Both samples1 and samples2 should be valid latent data types.

DimensionMismatchError: "Input dimensions do not match and cannot be upscaled."

  • Explanation: This error occurs when the dimensions of samples1 and samples2 are incompatible and cannot be upscaled to match each other.
  • Solution: Check the dimensions of your input samples and ensure they are either the same or can be made compatible through upscaling. You may need to preprocess your data to achieve this.

KeyError: "Missing 'samples' key in input data."

  • Explanation: This error occurs when the input data does not contain the required samples key.
  • Solution: Verify that your input data is correctly formatted and includes the samples key with the appropriate latent data.

Latent Batch Related Nodes

Go back to the extension to check out more related nodes.
WAS Node Suite
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.