ComfyUI > Nodes > ComfyUI-ArchAi3d-Qwen > 🎯 Mask to Position Guide

ComfyUI Node: 🎯 Mask to Position Guide

Class Name

ArchAi3D_Mask_To_Position_Guide

Category
ArchAi3d/Utils
Author
Amir Ferdos (ArchAi3d) (Account age: 1109days)
Extension
ComfyUI-ArchAi3d-Qwen
Latest Updated
2026-04-17
Github Stars
0.05K

How to Install ComfyUI-ArchAi3d-Qwen

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

🎯 Mask to Position Guide Description

Transforms mask tensor into a position guide by numbering distinct regions for visualization.

🎯 Mask to Position Guide:

The ArchAi3D_Mask_To_Position_Guide node is designed to transform a mask tensor into a position guide by detecting and numbering distinct regions within the mask. This node is particularly useful for AI artists who need to visualize and manage different areas of an image or 3D model. By converting the mask into a PIL image, the node identifies regions, assigns numbers based on a specified order, and draws numbered rectangles around these regions. The final output is a tensor that can be used for further processing or visualization. This node simplifies the task of region identification and numbering, making it easier to manage complex images or models with multiple areas of interest.

🎯 Mask to Position Guide Input Parameters:

mask

The mask parameter is the input tensor representing the mask that you want to process. This mask is converted into a PIL image for region detection. The quality and detail of the mask directly impact the accuracy of region detection and numbering.

padding

The padding parameter determines the amount of space added around each detected region. It affects how closely the rectangles fit around the regions. The default value is 5, and you can adjust it to ensure that the rectangles do not overlap or are too tight around the regions.

numbering_order

The numbering_order parameter specifies the order in which the regions are numbered. Options include "left_to_right" and potentially others, allowing you to control the sequence of numbering based on your specific needs. This parameter is crucial for maintaining a logical order in the visualization.

rectangle_color

The rectangle_color parameter defines the color of the rectangles drawn around each region. You can choose from predefined colors or specify a custom hex color. This customization helps in distinguishing the regions clearly.

line_thickness

The line_thickness parameter sets the thickness of the lines used to draw the rectangles. Adjusting this value can enhance the visibility of the rectangles, especially in high-resolution images.

number_size

The number_size parameter controls the size of the numbers drawn within the rectangles. This is important for ensuring that the numbers are legible, especially when dealing with small or densely packed regions.

number_color

The number_color parameter specifies the color of the numbers. Similar to rectangle_color, you can choose from predefined options or use a custom hex color to ensure the numbers stand out against the background.

background_color

The background_color parameter sets the background color for the guide image. This can be a standard color or a custom hex value, allowing you to match the guide's background with your project's theme or requirements.

🎯 Mask to Position Guide Output Parameters:

guide_tensor

The guide_tensor is the final output tensor that contains the processed image with numbered rectangles. This tensor can be used for further analysis or as a visual guide in your projects.

region_count

The region_count output provides the total number of regions detected and numbered in the mask. This information is useful for understanding the complexity of the image and for verifying that all intended regions have been identified.

bbox_list

The bbox_list is a JSON-formatted list of bounding boxes for each detected region. This list includes the coordinates and dimensions of each rectangle, providing detailed information for further processing or integration with other systems.

🎯 Mask to Position Guide Usage Tips:

  • Ensure that your input mask is clear and well-defined to improve the accuracy of region detection.
  • Adjust the padding and line_thickness parameters to optimize the visibility of rectangles, especially in images with closely packed regions.
  • Use custom hex colors for rectangle_color, number_color, and background_color to match your project's color scheme and enhance visual clarity.

🎯 Mask to Position Guide Common Errors and Solutions:

Invalid mask input

  • Explanation: The input mask is not in the correct tensor format or is corrupted.
  • Solution: Verify that the mask is a valid tensor and is properly formatted before inputting it into the node.

Region detection failure

  • Explanation: The node fails to detect regions due to poor mask quality or incorrect parameter settings.
  • Solution: Ensure the mask is clear and adjust parameters like padding and numbering_order to improve detection accuracy.

Color specification error

  • Explanation: An invalid color value is provided for rectangle, number, or background colors.
  • Solution: Double-check the color values, especially custom hex codes, to ensure they are correctly formatted.

🎯 Mask to Position Guide Related Nodes

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

🎯 Mask to Position Guide