A custom node package for ComfyUI that integrates the Segment Anything Model 3 (SAM3) from Meta, offering robust capabilities for image and video segmentation driven by textual prompts. This tool enhances the segmentation process by allowing users to interactively define regions of interest, making it highly adaptable for various applications.
- Image and Video Segmentation: Segment objects in both static images and video sequences using descriptive text inputs.
- Advanced Configuration Options: Fine-tune parameters for optimal tracking and segmentation results tailored to specific use cases.
- Interactive Annotation Tools: Utilize a visual editor to create precise prompts, enhancing the accuracy of segmentation outcomes.
Context
This tool serves as a custom node package within ComfyUI, designed to leverage the capabilities of the Segment Anything Model 3 (SAM3). Its primary function is to facilitate detailed image and video segmentation based on user-defined text prompts, thereby streamlining workflows that require object detection and tracking.
Key Features & Benefits
The tool offers a range of practical features that significantly enhance segmentation tasks:
- Text-Driven Segmentation: Users can specify objects to segment using natural language, making it intuitive to identify multiple categories within a single image.
- Video Tracking: It allows for the tracking of objects across video frames, maintaining consistent identifiers for each tracked object, which is crucial for dynamic content analysis.
- Customizable Backgrounds: Users can add various background colors to segmented images, improving visual clarity and presentation.
Advanced Functionalities
The package includes advanced functionalities such as:
- Flexible Configuration: Supports various devices and model precisions, enabling users to optimize performance based on their hardware capabilities.
- Fine-Tuning Parameters: Advanced controls for video tracking allow users to adjust parameters like detection thresholds and tracking behaviors, enhancing the accuracy of object tracking.
- Interactive Frames Editor: A visual editor enables users to create and modify prompts interactively, facilitating precise segmentation by allowing the addition of positive and negative points or bounding boxes.
Practical Benefits
This tool significantly streamlines the workflow in ComfyUI by providing users with enhanced control over segmentation tasks. It improves the quality of results through interactive editing and customizable settings, leading to more accurate object detection and tracking. The integration of text prompts simplifies the user experience, making it accessible even for those less familiar with technical segmentation processes.
Credits/Acknowledgments
- Original Authors: The SAM3 model is developed by Facebook Research.
- ComfyUI Contributors: Key contributions have been made by comfyanonymous and other associated repositories.
- License: This project adheres to the licensing terms of the original SAM3 repository.




