ComfyUI-TBG-SAM3 is a specialized extension for ComfyUI that integrates Meta’s Segment Anything Model 3 (SAM3) to facilitate advanced image segmentation tasks. This tool provides a streamlined approach for both text-based and point-based segmentation, generating exhaustive masks and enabling depth mapping for individual segments or entire images.
- Enhanced segmentation capabilities with unified point and box selection for greater user control.
- Compatibility with TBG-ETUR upscaling workflows and Impact Pack SEGS formats for improved output quality.
- Practical cleanup tools that refine segmented images by removing unwanted elements and filling gaps.
Context
ComfyUI-TBG-SAM3 is a custom node extension designed to enhance the ComfyUI framework by incorporating Meta’s Segment Anything Model 3 (SAM3). Its primary purpose is to simplify the process of image segmentation, enabling users to create precise masks from images through intuitive controls.
Key Features & Benefits
This extension offers several practical features, such as a unified selector for both point and box inputs, which streamlines the segmentation process. The inclusion of an instance toggle allows users to selectively generate instances, providing flexibility in output depending on the project's needs. Additionally, it supports output formats that are compatible with established workflows like TBG-ETUR and Impact Pack SEGS, ensuring users can integrate these segments seamlessly into their existing pipelines.
Advanced Functionalities
ComfyUI-TBG-SAM3 includes advanced functionalities such as a configurable crop factor for SEGS, allowing users to adjust how closely the cropping aligns with the segmented masks. The tool also features a web-based interactive prompt collector that enables users to draw points and boxes directly on images, facilitating a more intuitive segmentation experience. Moreover, the node supports both CUDA and CPU processing, optimizing performance based on available hardware.
Practical Benefits
By integrating ComfyUI-TBG-SAM3 into their workflows, users can significantly enhance their control over image segmentation tasks, resulting in higher-quality outputs and improved efficiency. The ability to clean up segmented images through tools like the Min-Size Filter and Fill Holes feature allows for a more polished final product. Overall, this extension streamlines the segmentation process, making it easier for users to achieve the desired results.
Credits/Acknowledgments
This extension acknowledges the contributions of Meta AI for developing the SAM3 model, the ComfyUI community for supporting custom node integrations, and Hugging Face for hosting the model and providing necessary services.