ComfyUI > Nodes > ComfyUI_ObjectClear > ObjectClearBatch

ComfyUI Node: ObjectClearBatch

Class Name

ObjectClearBatch

Category
ObjectClear
Author
smthemex (Account age: 893days)
Extension
ComfyUI_ObjectClear
Latest Updated
2025-11-24
Github Stars
0.03K

How to Install ComfyUI_ObjectClear

Install this extension via the ComfyUI Manager by searching for ComfyUI_ObjectClear
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_ObjectClear 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
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ObjectClearBatch Description

Handles and processes batches of mask data for image processing tasks, upscaling and concatenating mask sets for compatibility and seamless integration.

ObjectClearBatch:

The ObjectClearBatch node is designed to handle and process batches of mask data, which are essential in image processing tasks where specific areas of an image need to be isolated or manipulated. This node's primary function is to upscale and concatenate two sets of mask data, ensuring they are compatible in terms of dimensions and batch size. By doing so, it facilitates the seamless integration of multiple mask inputs into a single, unified output. This capability is particularly beneficial in scenarios where multiple masks need to be applied to a single image or a series of images, allowing for more complex and nuanced image editing and manipulation. The node's ability to handle different batch sizes and upscale masks ensures flexibility and adaptability in various image processing workflows.

ObjectClearBatch Input Parameters:

mask1

mask1 is the first input mask that the node processes. It is a tensor representing a mask with dimensions B (batch size), height, and width. This parameter is crucial as it defines the initial set of areas in an image that are to be processed or manipulated. The node will upscale this mask to match the dimensions of the second mask, ensuring compatibility for further operations. There are no specific minimum, maximum, or default values provided, but it is essential that the mask is correctly formatted as a tensor with the specified dimensions.

mask2

mask2 is the second input mask that the node processes alongside mask1. Like mask1, it is a tensor with dimensions B (batch size), height, and width. This parameter is used in conjunction with mask1 to create a combined mask output. The node will upscale this mask to ensure it matches the dimensions of mask1, allowing for a seamless concatenation of the two masks. As with mask1, there are no specific minimum, maximum, or default values, but the mask must be correctly formatted as a tensor with the specified dimensions.

ObjectClearBatch Output Parameters:

mask

The output parameter mask is a tensor that results from the concatenation of the upscaled mask1 and mask2. This output is crucial as it provides a unified mask that can be used in subsequent image processing tasks. The concatenated mask allows for the application of multiple mask effects on an image, enabling more complex and detailed image manipulations. The output tensor maintains the batch size and dimensions necessary for further processing in image workflows.

ObjectClearBatch Usage Tips:

  • Ensure that both mask1 and mask2 are correctly formatted as tensors with the appropriate dimensions before inputting them into the node to avoid errors during processing.
  • Utilize the node's ability to handle different batch sizes by inputting masks with varying batch dimensions, allowing for flexible and dynamic image processing workflows.

ObjectClearBatch Common Errors and Solutions:

ValueError: input image and mask must have same batch size

  • Explanation: This error occurs when the batch sizes of mask1 and mask2 do not match, which is necessary for the concatenation process.
  • Solution: Ensure that both input masks have the same batch size before processing them with the node. You may need to adjust the batch size of one or both masks to match.

RuntimeError: Sizes of tensors must match except in dimension 0

  • Explanation: This error indicates a mismatch in the dimensions of the input masks, which prevents successful concatenation.
  • Solution: Verify that the height and width of both mask1 and mask2 are the same. If they are not, you may need to resize one of the masks to ensure compatibility.

ObjectClearBatch Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_ObjectClear
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.