ComfyUI > Nodes > ComfyUI-TBG-SAM3

ComfyUI Extension: ComfyUI-TBG-SAM3

Repo Name

ComfyUI-TBG-SAM3

Author
Ltamann (Account age: 4766 days)
Nodes
View all nodes(6)
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

ComfyUI-TBG-SAM3 Description

ComfyUI-TBG-SAM3 is a ComfyUI extension that integrates Meta's Segment Anything Model 3 for advanced image and video segmentation. It offers text-prompt, point-based, and mask-driven capabilities, supporting depth map generation and is compatible with ComfyUI's Impact Pack SEGS format, running on Python 3.13+ with CUDA and CPU support.

ComfyUI-TBG-SAM3 Introduction

ComfyUI-TBG-SAM3 is an extension designed to enhance your image segmentation capabilities within the ComfyUI environment. It integrates Meta's Segment Anything Model 3 (SAM-3), which is renowned for its advanced image segmentation features. This extension allows you to perform precise image segmentation using a variety of methods, including point and box selection, text prompts, and mask-driven refinement. Whether you're looking to refine images with intricate details or automate segmentation tasks, ComfyUI-TBG-SAM3 offers a robust solution that can seamlessly integrate into your existing workflows.

How ComfyUI-TBG-SAM3 Works

At its core, ComfyUI-TBG-SAM3 leverages the power of SAM-3 to provide a flexible and efficient segmentation process. Imagine SAM-3 as a highly skilled artist who can understand and interpret your instructions to segment images precisely. You can guide this artist using simple tools like points and boxes, or even by describing what you want in words. The extension then processes these inputs to create detailed masks that define the areas of interest in your images. This process is akin to giving a sculptor a block of marble and a set of instructions, resulting in a finely crafted piece of art.

ComfyUI-TBG-SAM3 Features

  • Unified Point-and-Box Selector: This feature combines point and box selection into a single tool, allowing you to easily specify areas of interest. You can use positive prompts to include areas and negative prompts to exclude them, making the segmentation process intuitive and interactive.
  • Enhanced Segmentation Logic with Instance Toggle: The segmentation node follows the official SAM3 workflow and includes a toggle to enable or disable instance generation, providing you with clean outputs tailored to your needs.
  • Tile-Based TBG-ETUR Compatibility: The extension supports special output formats that are fully compatible with TBG-ETUR’s tile-based upscaling workflow, ensuring stable segmentation masks for high-resolution images.
  • Impact Pack SEGS Support: Seamlessly integrates with Impact Pack SEGS, allowing for automated and multi-stage segmentation pipelines.
  • New Cleanup Tools: Includes a Min-Size Filter to remove small, unwanted segments and a Fill Holes feature to automatically fill gaps within segmented regions.

ComfyUI-TBG-SAM3 Models

The extension utilizes the SAM3 model, which is stored in a unified model folder. This model is essential for the segmentation tasks and is located at models/sam3/sam3.pt. The model can be loaded and downloaded using the provided nodes, ensuring you always have access to the latest version.

What's New with ComfyUI-TBG-SAM3

The latest update of ComfyUI-TBG-SAM3 focuses on improving usability and compatibility. Key improvements include:

  • A unified point-and-box selector for streamlined segmentation.
  • Enhanced segmentation logic with an instance toggle for cleaner outputs.
  • Full compatibility with tile-based upscalers like TBG-ETUR.
  • Direct support for Impact Pack SEGS formats.
  • New tools for segment cleanup, such as the Min-Size Filter and Fill Holes. These updates make the extension more versatile and user-friendly, allowing AI artists to achieve better results with less effort.

Troubleshooting ComfyUI-TBG-SAM3

If you encounter issues while using ComfyUI-TBG-SAM3, here are some common solutions:

  • Nodes Not Appearing: Ensure that SAM3 is correctly installed in your environment. Check the installation logs for any errors and verify that all dependencies are installed.
  • Model Download Issues: Make sure you have authenticated with Hugging Face to download the SAM3 model. Set the HF_TOKEN environment variable with your access token.
  • Segmentation Errors: Double-check your input prompts and ensure they are correctly formatted. Use the interactive prompt collector node to visualize and adjust your prompts.

Learn More about ComfyUI-TBG-SAM3

To further enhance your understanding and usage of ComfyUI-TBG-SAM3, consider exploring the following resources:

  • ComfyUI-TBG-ETUR: Learn more about the tile-based upscaling workflow compatible with ComfyUI-TBG-SAM3.
  • ComfyUI-Impact-Pack: Discover additional tools and nodes that complement the segmentation capabilities of ComfyUI-TBG-SAM3. - SAM 3 Project (https://ai.meta.com/sam3): Explore the official SAM 3 project page for detailed information on the model's capabilities and applications. These resources provide valuable insights and tutorials to help you make the most of ComfyUI-TBG-SAM3 in your creative projects.

ComfyUI-TBG-SAM3 Related Nodes

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.