ComfyUI > Nodes > ComfyUI 1hewNodes > String Coordinate to BBox Mask

ComfyUI Node: String Coordinate to BBox Mask

Class Name

1hew_StringCoordinateToBBoxMask

Category
1hewNodes/conversion
Author
1hew (Account age: 1113days)
Extension
ComfyUI 1hewNodes
Latest Updated
2026-04-17
Github Stars
0.03K

How to Install ComfyUI 1hewNodes

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

String Coordinate to BBox Mask Description

Converts string bounding box coordinates into mask tensors for precise image manipulation.

String Coordinate to BBox Mask:

The 1hew_StringCoordinateToBBoxMask node is designed to convert a string representation of bounding box coordinates into a mask tensor that can be used in image processing tasks. This node is particularly useful for AI artists who need to work with image data and require a way to visualize or manipulate specific regions within an image. By transforming string-based coordinate data into a tangible mask, this node facilitates the creation of precise image masks that can be used for various purposes, such as cropping, overlaying, or highlighting specific areas of an image. The node's ability to handle different output modes allows for flexibility in how the bounding box masks are generated, either as separate masks for each bounding box or as a combined mask for all bounding boxes. This functionality is essential for tasks that require detailed image manipulation and analysis, providing a bridge between textual data and visual representation.

String Coordinate to BBox Mask Input Parameters:

coordinates_string

The coordinates_string parameter is a string input that contains the bounding box coordinates in a specific format. This string is parsed to extract the coordinates, which are then used to generate the bounding box masks. The format of the string should be such that it can be easily cleaned and split into individual coordinate values. This parameter is crucial as it directly influences the accuracy and placement of the generated masks. There are no explicit minimum or maximum values, but the string should be formatted correctly to ensure proper parsing.

image

The image parameter represents the image data on which the bounding box masks will be applied. It is a tensor with dimensions corresponding to the batch size, height, width, and channels of the image. This parameter is essential as it defines the canvas on which the masks are created, and its dimensions determine the size of the masks. The image data must be provided in a compatible format for the node to function correctly.

output_mode

The output_mode parameter determines how the bounding box masks are generated and returned. It can take values such as "separate" or other modes, which dictate whether each bounding box is represented as an individual mask or if all bounding boxes are combined into a single mask. This parameter allows for flexibility in the output, catering to different use cases where separate or combined masks might be needed. The choice of output mode affects the structure of the resulting mask tensor.

String Coordinate to BBox Mask Output Parameters:

bbox_mask_tensor

The bbox_mask_tensor is the output parameter that contains the generated bounding box masks. It is a tensor where each element corresponds to a mask created from the input coordinates. The masks are represented as binary values, with 1.0 indicating the presence of a bounding box and 0.0 indicating the absence. This output is crucial for further image processing tasks, as it provides a visual representation of the specified bounding boxes, enabling operations like cropping, masking, or overlaying on the original image.

String Coordinate to BBox Mask Usage Tips:

  • Ensure that the coordinates_string is formatted correctly to avoid parsing errors and to ensure accurate mask generation.
  • Choose the output_mode based on your specific needs; use "separate" if you require individual masks for each bounding box, or another mode if a combined mask is more suitable for your task.
  • Verify that the image parameter is correctly shaped and contains valid image data to prevent issues during mask application.

String Coordinate to BBox Mask Common Errors and Solutions:

Invalid coordinate format

  • Explanation: The coordinates_string is not formatted correctly, leading to parsing errors.
  • Solution: Ensure that the string is cleaned and formatted properly, with coordinates separated by spaces or commas.

Image tensor shape mismatch

  • Explanation: The image parameter does not have the expected dimensions, causing issues in mask generation.
  • Solution: Verify that the image tensor has the correct shape, matching the expected batch size, height, width, and channels.

Output mode not recognized

  • Explanation: The output_mode provided is not supported by the node.
  • Solution: Use a valid output mode, such as "separate", to ensure proper mask generation.

String Coordinate to BBox Mask Related Nodes

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

String Coordinate to BBox Mask