ComfyUI > Nodes > MTB Nodes > Batch Merge (mtb)

ComfyUI Node: Batch Merge (mtb)

Class Name

Batch Merge (mtb)

Category
mtb/batch
Author
melMass (Account age: 3754days)
Extension
MTB Nodes
Latest Updated
2024-07-02
Github Stars
0.35K

How to Install MTB Nodes

Install this extension via the ComfyUI Manager by searching for MTB Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter MTB Nodes 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

Batch Merge (mtb) Description

Merge multiple image batches with different frame counts into a cohesive batch, ensuring synchronization and customization of merging process.

Batch Merge (mtb):

The Batch Merge (mtb) node is designed to combine multiple image batches that may have different frame counts into a single cohesive batch. This node is particularly useful for AI artists who work with animations or sequences of images, as it ensures that all image batches are synchronized to the same frame count before merging. By adjusting the frame counts through either head or tail filling, the node ensures consistency across batches. The merging process can be customized using different fusion modes such as addition, multiplication, or averaging, allowing for creative flexibility in how the final merged image is produced. This node simplifies the process of batch merging, making it accessible even to those without a deep technical background.

Batch Merge (mtb) Input Parameters:

fusion_mode

The fusion_mode parameter determines how the images in the batches will be combined. It offers three options: "add", "multiply", and "average". The "add" mode sums the pixel values of corresponding frames, the "multiply" mode multiplies the pixel values, and the "average" mode calculates the average of the pixel values. The default value is "average". This parameter significantly impacts the visual outcome of the merged image, with each mode providing a different blending effect.

fill

The fill parameter specifies how to handle batches with fewer frames than the maximum frame count. It has two options: "head" and "tail". If "head" is selected, the first frame of the shorter batch is repeated to match the frame count. If "tail" is selected, the last frame is repeated. The default value is "tail". This parameter ensures that all batches are aligned in terms of frame count before merging, which is crucial for maintaining the integrity of the animation or sequence.

Batch Merge (mtb) Output Parameters:

IMAGE

The output parameter IMAGE represents the final merged image batch. This batch has a consistent frame count across all images, achieved by filling and merging according to the specified parameters. The resulting image batch can be used in further processing or as a final output, providing a seamless and cohesive visual sequence.

Batch Merge (mtb) Usage Tips:

  • To achieve a smooth blending effect, use the "average" fusion mode, which evenly combines the pixel values of corresponding frames.
  • When working with animations where the beginning frames are more critical, use the "head" fill option to ensure the initial frames are preserved and repeated as needed.
  • For more dynamic and high-contrast results, experiment with the "add" or "multiply" fusion modes, which can create unique visual effects by combining pixel values in different ways.

Batch Merge (mtb) Common Errors and Solutions:

"Input batches have incompatible dimensions"

  • Explanation: This error occurs when the input image batches have different dimensions (height, width, or channels).
  • Solution: Ensure that all input batches have the same dimensions before merging. You may need to resize or crop the images to match.

"Invalid fusion mode selected"

  • Explanation: This error happens when an unsupported fusion mode is specified.
  • Solution: Check the fusion_mode parameter and ensure it is set to one of the supported options: "add", "multiply", or "average".

"Invalid fill option selected"

  • Explanation: This error occurs when an unsupported fill option is specified.
  • Solution: Verify that the fill parameter is set to either "head" or "tail".

Batch Merge (mtb) Related Nodes

Go back to the extension to check out more related nodes.
MTB Nodes
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.