ComfyUI > Nodes > ComfyUI-SAM3

ComfyUI Extension: ComfyUI-SAM3

Repo Name

ComfyUI-SAM3

Author
PozzettiAndrea (Account age: 2240 days)
Nodes
View all nodes(12)
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

ComfyUI-SAM3 Description

ComfyUI-SAM3 integrates Meta's SAM3 model into ComfyUI, allowing open-vocabulary image segmentation via natural language prompts. It features automatic model downloads, geometric refinement, and adjustable confidence thresholds.

ComfyUI-SAM3 Introduction

ComfyUI-SAM3 is an innovative extension that integrates Meta's Segment Anything Model 3 (SAM3) into the ComfyUI platform. This extension empowers AI artists by enabling open-vocabulary image and video segmentation using natural language text prompts. Essentially, it allows you to segment and track objects in images and videos by simply describing them with text, such as "a cat in a red hat" or "a car on the left." This capability can significantly enhance your creative workflow by simplifying the process of isolating and manipulating specific elements within your visual projects.

How ComfyUI-SAM3 Works

At its core, ComfyUI-SAM3 leverages the power of SAM3, a sophisticated model designed for promptable segmentation. This means it can understand and act upon a wide range of text prompts to identify and segment objects in both images and videos. The model uses a combination of text and visual prompts, such as points and boxes, to accurately detect and segment objects. For instance, if you provide a text prompt like "a person in a blue shirt," the model will identify and segment all instances of people wearing blue shirts in the image or video. This is achieved through a unique architecture that includes a presence token to differentiate between closely related prompts and a decoupled detector-tracker design for efficient processing.

ComfyUI-SAM3 Features

ComfyUI-SAM3 offers a variety of features tailored to enhance your segmentation tasks:

  • Image Segmentation: Use text prompts to segment objects in images. You can create bounding boxes and point prompts to refine the segmentation process.
  • Video Tracking: Track objects across video frames using text prompts. This feature is particularly useful for projects involving dynamic scenes.
  • Interactive Tools: Collect point prompts interactively and draw bounding boxes to guide the segmentation process.
  • GPU Acceleration: For those with compatible NVIDIA GPUs, the extension offers optional GPU acceleration to speed up video tracking significantly. These features can be customized to suit your specific needs. For example, you can adjust the text prompts to include attributes or spatial relations, such as "a person on the left" or "a black car," to achieve more precise segmentation results.

ComfyUI-SAM3 Models

The extension utilizes the SAM3 model, which is a unified foundation model for segmentation tasks. It is designed to handle a vast array of open-vocabulary prompts, making it highly versatile for different artistic projects. The model's architecture allows it to segment all instances of a concept specified by a text phrase, providing you with the flexibility to explore creative ideas without being limited by predefined categories.

Troubleshooting ComfyUI-SAM3

If you encounter issues with ComfyUI-SAM3, here are some common problems and solutions:

  • SAM3 Nodes Not Appearing: If the nodes do not load and you see a message about "running in pytest mode," this is a false positive. To resolve it, set the environment variable SAM3_FORCE_INIT=1 before starting ComfyUI.
  • GPU Acceleration Issues: Ensure your NVIDIA GPU meets the requirements (compute capability 7.5+). If using an RTX 50-series GPU, experimental support is available, but stability is not guaranteed.

Learn More about ComfyUI-SAM3

To further explore the capabilities of ComfyUI-SAM3, you can access additional resources such as tutorials and community forums. These platforms provide valuable insights and support, helping you make the most of this powerful extension. For more technical details, you can refer to the SAM3 project page (https://ai.meta.com/sam3) and the GitHub repository for in-depth documentation and updates.

ComfyUI-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.