ComfyUI > Nodes > ComfyUI_LayerStyle_Advance > LayerMask: Draw BBox Mask(Advance)

ComfyUI Node: LayerMask: Draw BBox Mask(Advance)

Class Name

LayerMask: DrawBBoxMask

Category
😺dzNodes/LayerMask
Author
chflame163 (Account age: 701days)
Extension
ComfyUI_LayerStyle_Advance
Latest Updated
2025-03-09
Github Stars
0.18K

How to Install ComfyUI_LayerStyle_Advance

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

LayerMask: Draw BBox Mask(Advance) Description

Facilitates precise bounding box mask creation for object detection and image segmentation tasks, allowing adjustable box sizes.

LayerMask: Draw BBox Mask(Advance):

The LayerMask: DrawBBoxMask node is designed to facilitate the creation of precise bounding box masks over images, which is particularly useful in object detection and image segmentation tasks. This node allows you to draw bounding boxes around detected objects in an image, providing a visual representation of the areas of interest. The node is capable of adjusting the size of these bounding boxes by expanding or contracting them in any direction, which can be useful for fine-tuning the mask to better fit the object. This flexibility makes it an essential tool for AI artists who need to manipulate image layers and masks with precision, enhancing the quality and accuracy of their visual outputs.

LayerMask: Draw BBox Mask(Advance) Input Parameters:

image

The image parameter is the input image on which the bounding box masks will be drawn. It serves as the canvas for the bounding boxes and is essential for visualizing the areas of interest. The image should be in a compatible format that the node can process.

bboxes

The bboxes parameter represents the bounding boxes that define the areas to be masked. These are typically provided as a list of coordinates, specifying the top-left and bottom-right corners of each box. This parameter is crucial as it determines where the masks will be applied on the image.

grow_top

The grow_top parameter allows you to expand or contract the bounding box vertically from the top. It is a float value with a default of 0, and it can range from -10 to 10. A positive value will expand the box upwards, while a negative value will contract it. This parameter helps in adjusting the mask to better fit the object.

grow_bottom

Similar to grow_top, the grow_bottom parameter adjusts the bounding box vertically from the bottom. It also ranges from -10 to 10 with a default of 0. This parameter is useful for fine-tuning the mask to ensure it covers the desired area accurately.

grow_left

The grow_left parameter modifies the bounding box horizontally from the left side. It is a float value ranging from -10 to 10, with a default of 0. This allows for precise control over the horizontal dimensions of the mask, ensuring it aligns well with the object.

grow_right

The grow_right parameter adjusts the bounding box horizontally from the right side. Like the other grow parameters, it ranges from -10 to 10 and defaults to 0. This parameter is essential for achieving the desired width of the mask.

LayerMask: Draw BBox Mask(Advance) Output Parameters:

mask

The mask output parameter is the resulting mask generated by the node. It is a visual representation of the bounding boxes applied to the input image, highlighting the areas of interest. This mask can be used for further processing or analysis, such as object detection or segmentation tasks.

LayerMask: Draw BBox Mask(Advance) Usage Tips:

  • To achieve the best results, ensure that the bounding boxes (bboxes) are accurately defined to encompass the objects of interest in the image.
  • Utilize the grow parameters (grow_top, grow_bottom, grow_left, grow_right) to fine-tune the size of the bounding boxes, ensuring they fit snugly around the objects without unnecessary overlap or gaps.

LayerMask: Draw BBox Mask(Advance) Common Errors and Solutions:

Invalid bbox after extend: (x1,y1,x2,y2)

  • Explanation: This error occurs when the bounding box coordinates become invalid after applying the grow parameters, resulting in a situation where the top-left corner is below or to the right of the bottom-right corner.
  • Solution: Adjust the grow parameters to ensure that the bounding box remains valid. Avoid using excessively large values that could invert the box dimensions.

No object found

  • Explanation: This message indicates that no bounding boxes were detected in the input image, possibly due to incorrect or missing bboxes data.
  • Solution: Verify that the bboxes parameter is correctly populated with valid coordinates. Ensure that the input image contains detectable objects and that the bounding box data is accurate.

LayerMask: Draw BBox Mask(Advance) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_LayerStyle_Advance
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 Playground, enabling artists to harness the latest AI tools to create incredible art.