ComfyUI > Nodes > ComfyUI-SAM3 > SAM3 Point Collector

ComfyUI Node: SAM3 Point Collector

Class Name

SAM3PointCollector

Category
SAM3
Author
PozzettiAndrea (Account age: 2240days)
Extension
ComfyUI-SAM3
Latest Updated
2025-12-22
Github Stars
0.32K

How to Install ComfyUI-SAM3

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

SAM3 Point Collector Description

Interactive node for selecting and normalizing image points for segmentation tasks in SAM3.

SAM3 Point Collector:

The SAM3PointCollector is an interactive node designed to facilitate the collection of user-defined points on an image canvas for use in segmentation tasks. This node allows you to intuitively select positive and negative points directly on an image, which are then normalized and prepared for further processing in segmentation models like SAM3Segmentation. By providing a visual interface, it simplifies the process of point selection, making it accessible even to those without a technical background. The node's primary goal is to streamline the input of spatial data, ensuring that the points are accurately captured and formatted for subsequent analysis. This functionality is particularly beneficial for AI artists and designers who need to define regions of interest within an image for segmentation purposes, offering a straightforward method to influence the segmentation outcome by specifying areas of importance or exclusion.

SAM3 Point Collector Input Parameters:

image

The image parameter is the visual canvas on which you will interact to select points. It serves as the backdrop for point selection, allowing you to visually identify and mark areas of interest. The image is displayed in an interactive canvas where left-clicking adds positive points (indicated by green circles), and Shift+Left-click or Right-click adds negative points (indicated by red circles). This parameter does not have a minimum or maximum value but is essential for the node's operation as it provides the context for point selection.

points_store

The points_store parameter is a string that acts as a storage mechanism for the points you select. It is not directly interacted with during the point selection process but is used internally to manage and cache the points data. The default value is an empty JSON object ({}), and it is crucial for maintaining the state of the points between interactions.

coordinates

The coordinates parameter is a string that contains the JSON-encoded list of positive point coordinates. These coordinates are parsed and normalized based on the image dimensions to ensure they are in the correct format for further processing. The default value is an empty list ([]), and it is vital for capturing the specific locations of positive points on the image.

neg_coordinates

The neg_coordinates parameter is similar to coordinates but specifically for negative points. It holds the JSON-encoded list of negative point coordinates, which are also normalized to fit the image dimensions. The default value is an empty list ([]), and it plays a key role in defining areas that should be excluded or treated differently in the segmentation process.

SAM3 Point Collector Output Parameters:

positive_points

The positive_points output parameter provides an array of normalized coordinates and labels for the positive points selected on the image. Each point is represented by its normalized x and y coordinates, along with a label indicating its positive status. This output is crucial for segmentation tasks as it defines the areas of interest that the segmentation model should focus on.

negative_points

The negative_points output parameter offers an array of normalized coordinates and labels for the negative points. Similar to positive_points, each point includes its normalized coordinates and a label, but in this case, the label indicates a negative status. This output is essential for guiding the segmentation model to avoid or treat these areas differently, ensuring a more accurate and tailored segmentation result.

SAM3 Point Collector Usage Tips:

  • Ensure that the image you use is clear and well-defined to make point selection easier and more accurate.
  • Use a combination of positive and negative points to effectively guide the segmentation model, providing a balanced input that highlights areas of interest and exclusion.
  • Regularly save your point selections using the points_store to avoid losing data during the interactive process.

SAM3 Point Collector Common Errors and Solutions:

JSONDecodeError

  • Explanation: This error occurs when the coordinates or neg_coordinates strings are not properly formatted as JSON.
  • Solution: Ensure that the input strings for coordinates and neg_coordinates are valid JSON. Use a JSON validator to check the format before inputting them into the node.

Image Dimension Mismatch

  • Explanation: This error can happen if the image dimensions do not match the expected format, leading to issues in point normalization.
  • Solution: Verify that the image is correctly loaded and that its dimensions are as expected. Ensure the image is not corrupted and is in a supported format.

SAM3 Point Collector Related Nodes

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