ComfyUI > Nodes > ComfyUI > SAM3 Detect

ComfyUI Node: SAM3 Detect

Class Name

SAM3_Detect

Category
detection
Author
ComfyAnonymous (Account age: 763days)
Extension
ComfyUI
Latest Updated
2026-05-13
Github Stars
112.77K

How to Install ComfyUI

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

Powerful tool for object detection and segmentation using SAM3 framework, with advanced text detection and memory-based tracking capabilities.

SAM3 Detect:

The SAM3_Detect node is a powerful tool designed for detection and segmentation tasks, leveraging the capabilities of the SAM3 (Segment Anything 3) framework. This node is particularly adept at identifying and segmenting objects within images or video frames, utilizing advanced open vocabulary and text detection techniques. Its primary goal is to provide a seamless and efficient way to detect objects based on textual prompts, making it highly versatile for various applications in AI art and beyond. By integrating sophisticated memory-based tracking, SAM3_Detect can also handle video sequences, ensuring consistent object detection across frames. This node is essential for users looking to automate and enhance their image and video processing workflows, offering a robust solution for complex detection tasks.

SAM3 Detect Input Parameters:

conditioning

The conditioning parameter is crucial for guiding the detection process. It consists of a list of text embeddings and corresponding attention masks that define the objects or features to be detected. This parameter allows you to specify multiple conditions or prompts, each with its own set of embeddings and masks. The embeddings are processed on the specified device and data type, ensuring compatibility with the detection model. The attention mask, if not provided, defaults to a mask of ones, indicating full attention across the embeddings. This parameter directly influences the detection results, as it determines what the model should focus on during the segmentation process. There are no explicit minimum, maximum, or default values, as it depends on the specific use case and the complexity of the objects to be detected.

SAM3 Detect Output Parameters:

mask_out

The mask_out parameter represents the output of the detection process, providing the segmented masks of the detected objects. This output is a tensor that combines all individual masks, either concatenated or stacked, depending on the configuration. The masks highlight the areas in the image or video frames where the detected objects are located, allowing for further processing or analysis. This output is essential for visualizing the results of the detection and segmentation tasks, offering a clear representation of the identified objects.

all_bbox_dicts

The all_bbox_dicts parameter contains the bounding box information for each detected object. This output provides the coordinates and dimensions of the bounding boxes, which are crucial for understanding the spatial location and size of the detected objects within the image or video frames. This information is valuable for tasks that require precise object localization, such as tracking or further image manipulation.

SAM3 Detect Usage Tips:

  • Ensure that the conditioning parameter is well-defined with clear text prompts and appropriate attention masks to achieve accurate detection results.
  • Utilize the node's ability to handle multiple conditions by providing a diverse set of text embeddings, which can enhance the detection of various objects within a single image or video sequence.

SAM3 Detect Common Errors and Solutions:

ValueError: "SAM3 (non-multiplex) requires initial_mask for video tracking"

  • Explanation: This error occurs when attempting to track video without providing initial masks, which are necessary for the SAM3 model in non-multiplex mode.
  • Solution: Ensure that you provide initial masks when using the node for video tracking tasks. These masks serve as a starting point for the detection process, allowing the model to track objects across frames effectively.

SAM3 Detect Related Nodes

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

SAM3 Detect