ComfyUI > Nodes > ComfyUI-TBG-SAM3 > TBG SAM3 Selector

ComfyUI Node: TBG SAM3 Selector

Class Name

TBGSAM3PromptCollector

Category
TBG/SAM3
Author
Ltamann (Account age: 4766days)
Extension
ComfyUI-TBG-SAM3
Latest Updated
2025-11-29
Github Stars
0.14K

How to Install ComfyUI-TBG-SAM3

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

TBG SAM3 Selector Description

TBGSAM3PromptCollector streamlines interactive prompt management for precise image segmentation.

TBG SAM3 Selector:

The TBGSAM3PromptCollector is a versatile node designed to streamline the process of collecting and managing interactive prompts for image segmentation tasks. It unifies the collection of points and boxes into a single node, allowing for a more efficient and organized approach to prompt management. This node is particularly beneficial for AI artists who need to specify regions of interest within an image, as it supports both positive and negative prompts, enabling precise control over the segmentation process. By toggling between point and box selection modes, users can easily annotate images with positive or negative labels, enhancing the accuracy and effectiveness of the segmentation model. The TBGSAM3PromptCollector is an essential tool for those looking to optimize their image processing workflows, providing a user-friendly interface for prompt collection and integration into the SAM3 segmentation pipeline.

TBG SAM3 Selector Input Parameters:

image

The image parameter is the primary input for the node, representing the image on which interactive selection will be performed. Users can toggle between point and box selection modes using the 'B' key, with left-clicks indicating positive selections and right-clicks or shift-clicks indicating negative selections. This parameter is crucial as it serves as the canvas for all subsequent prompt annotations. There are no specific minimum or maximum values for this parameter, as it is dependent on the image data provided by the user.

positive_points

The positive_points parameter is a string that contains a list of coordinates representing points on the image that are positively labeled. These points are used to indicate areas of interest that should be included in the segmentation. The default value is an empty list ([]), and it is not multiline, meaning it should be formatted as a single line of text. This parameter directly impacts the segmentation results by specifying which regions are considered important.

negative_points

The negative_points parameter is similar to positive_points, but it contains coordinates for points that are negatively labeled. These points indicate areas that should be excluded from the segmentation. Like positive_points, the default value is an empty list ([]), and it is not multiline. This parameter helps refine the segmentation by clearly defining regions that are not of interest.

positive_boxes

The positive_boxes parameter is a string that contains a list of coordinates defining rectangular boxes on the image that are positively labeled. These boxes are used to highlight larger areas of interest for inclusion in the segmentation. The default value is an empty list ([]), and it is not multiline. This parameter allows users to quickly annotate significant regions without needing to specify individual points.

negative_boxes

The negative_boxes parameter functions like positive_boxes, but it defines boxes that are negatively labeled. These boxes mark areas that should be excluded from the segmentation. The default value is an empty list ([]), and it is not multiline. This parameter is useful for excluding large, irrelevant areas from the segmentation process.

TBG SAM3 Selector Output Parameters:

sam3_selectors_pipe

The sam3_selectors_pipe is the output of the node, representing the collected prompts in a format suitable for integration into the SAM3 segmentation pipeline. This output is crucial as it encapsulates all the user-defined points and boxes, both positive and negative, and prepares them for further processing by the segmentation model. The sam3_selectors_pipe ensures that the collected prompts are efficiently utilized, enhancing the overall segmentation accuracy and performance.

TBG SAM3 Selector Usage Tips:

  • To maximize the effectiveness of the TBGSAM3PromptCollector, ensure that you accurately label points and boxes as positive or negative based on their relevance to the segmentation task. This will significantly improve the model's ability to distinguish between areas of interest and irrelevant regions.
  • Utilize the toggle feature to switch between point and box selection modes, allowing for flexible and precise annotations. This can be particularly useful when dealing with complex images that require both detailed and broad annotations.

TBG SAM3 Selector Common Errors and Solutions:

Invalid JSON format for points or boxes

  • Explanation: This error occurs when the input strings for points or boxes are not properly formatted as JSON arrays.
  • Solution: Ensure that the input strings for positive_points, negative_points, positive_boxes, and negative_boxes are correctly formatted as JSON arrays. For example, use "[{"x": 10, "y": 20}]" for a single point.

Image dimensions not matching prompt coordinates

  • Explanation: This error arises when the coordinates specified in the prompts exceed the dimensions of the input image.
  • Solution: Verify that all point and box coordinates are within the bounds of the image dimensions. Adjust the coordinates or resize the image as necessary to ensure compatibility.

TBG SAM3 Selector Related Nodes

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