ComfyUI  >  Nodes  >  ComfyUI-SuperBeasts >  Mask Batch Manager (SuperBeasts.AI)

ComfyUI Node: Mask Batch Manager (SuperBeasts.AI)

Class Name

Mask Batch Manager (SuperBeasts.AI)

Category
SuperBeastsAI/Masks
Author
SuperBeastsAI (Account age: 87 days)
Extension
ComfyUI-SuperBeasts
Latest Updated
6/1/2024
Github Stars
0.1K

How to Install ComfyUI-SuperBeasts

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

Mask Batch Manager (SuperBeasts.AI) Description

Streamline processing of multiple mask images, resize, crop, and concatenate into a single batch for AI artists.

Mask Batch Manager (SuperBeasts.AI):

The Mask Batch Manager (SuperBeasts.AI) is a powerful tool designed to streamline the process of managing and processing multiple mask images in a batch. This node is particularly useful for AI artists who need to handle several mask images simultaneously, ensuring they are resized and cropped to a specified width and height. The primary function of this node is to take multiple mask inputs, process them according to the specified dimensions, and concatenate them into a single batch. This helps in maintaining consistency across all mask images and simplifies the workflow by automating the resizing and cropping tasks. The node also allows for reordering of masks based on a specified sequence, providing flexibility in how the masks are processed and combined.

Mask Batch Manager (SuperBeasts.AI) Input Parameters:

width

The width parameter specifies the desired width to which all input masks will be resized. This ensures that all masks in the batch have a uniform width, which is crucial for consistent processing. The default value is 512, and it must be a positive integer. Adjusting this value will directly impact the aspect ratio and the final appearance of the masks.

height

The height parameter defines the target height for the resized masks. Similar to the width parameter, this ensures uniformity in the height of all masks in the batch. The default value is 768, and it must be a positive integer. This parameter is essential for maintaining the aspect ratio and ensuring that the masks fit the desired dimensions.

new_order

The new_order parameter is an optional string that allows you to specify a new sequence for the masks. This string should contain comma-separated indices indicating the desired order of the masks. For example, "3,1,2" would reorder the masks such that the third mask is first, followed by the first and second masks. If left empty, the masks will be processed in their original order. This parameter provides flexibility in how the masks are combined and processed.

mask1, mask2, ..., mask12

These optional parameters represent the individual mask inputs that you want to process. You can provide up to 12 masks, and each mask will be resized and cropped according to the specified width and height. If fewer than 12 masks are provided, the node will process only the available masks. These parameters allow you to input multiple masks for batch processing, making it easier to handle large sets of mask images.

Mask Batch Manager (SuperBeasts.AI) Output Parameters:

MASK

The MASK output parameter is the final concatenated batch of processed masks. This output contains all the input masks resized, cropped, and combined into a single tensor. The resulting batch will have a consistent width and height as specified by the input parameters, ensuring uniformity across all masks. This output is essential for further processing or analysis, as it provides a standardized set of mask images ready for use.

Mask Batch Manager (SuperBeasts.AI) Usage Tips:

  • Ensure that the width and height parameters are set to the desired dimensions before processing the masks to maintain consistency.
  • Use the new_order parameter to reorder the masks if a specific sequence is required for your project.
  • Provide as many masks as needed, up to the maximum of 12, to take full advantage of the batch processing capabilities.
  • Verify that all input masks are in the correct format and dimensions to avoid errors during processing.

Mask Batch Manager (SuperBeasts.AI) Common Errors and Solutions:

Invalid mask shape: (shape). Expected (N, 1, H, W) or (1, H, W) or (H, W).

  • Explanation: This error occurs when the input mask does not match the expected dimensions or format.
  • Solution: Ensure that all input masks are in one of the expected formats: (N, 1, H, W), (1, H, W), or (H, W). Adjust the mask dimensions or format as needed before inputting them into the node.

At least one input mask must be provided.

  • Explanation: This error is raised when no valid masks are provided as input.
  • Solution: Provide at least one mask input to the node. Ensure that the mask parameters (mask1, mask2, etc.) are correctly set with valid mask images.

Index out of range in new_order parameter.

  • Explanation: This error occurs when the indices specified in the new_order parameter exceed the number of provided masks.
  • Solution: Check the new_order string to ensure that all indices are within the range of the provided masks. Adjust the indices to match the available masks.

Mask Batch Manager (SuperBeasts.AI) Related Nodes

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