ComfyUI-SAM3
ComfyUI integration for Meta's SAM3 model enabling open-vocabulary image segmentation using natural language text prompts, with automatic model download, geometric…
Nodes (14)
Get Meta's SAM3 weights into your ComfyUI graph
Draw boxes on the image to guide SAM3
Merge single boxes into one prompt SAM3 accepts
Merge single points into one prompt SAM3 accepts
Build a box prompt from center and size
Build a single point prompt from numbers
Segment anything by typing what you want
Mask several regions in one pass
Mark several objects for one multiprompt pass
Click your points right on the image
Track your masked object across every frame
Point-and-box masking when text isn't precise enough
Turn the tracked state into masks and frames you can use
Mark your target on the first frame
[!WARNING] Warning, uses experimental package
comfy-envto attempt a one click isolated install. Will download and use pixi package manager.
ComfyUI-SAM3
Installation
Three options, in order of speed → reliability:
- ComfyUI Manager (recommended) — search for
SAM3in the Manager and click Install from the highest version displayed. If that doesn't work, try nightly. - Manager via Git URL — in ComfyUI Manager: "Install via Git URL" with
https://github.com/PozzettiAndrea/ComfyUI-SAM3.git. - Manual (most reliable):
cd ComfyUI/custom_nodes git clone https://github.com/PozzettiAndrea/ComfyUI-SAM3.git cd ComfyUI-SAM3 pip install -r requirements.txt --upgrade python install.py
Please report any problems you hit during installation or use of my nodes — open a Discussion or Issue. Very grateful for your help! 🙏
<div align="center"> <a href="https://pozzettiandrea.github.io/ComfyUI-SAM3/"> <img src="https://pozzettiandrea.github.io/ComfyUI-SAM3/gallery-preview.png" alt="Workflow Test Gallery" width="800"> </a> <br> <b><a href="https://pozzettiandrea.github.io/ComfyUI-SAM3/">View Live Test Gallery →</a></b> </div>
ComfyUI integration for Meta's SAM3 (Segment Anything Model 3). Open-vocabulary image and video segmentation using natural language text prompts.
https://github.com/user-attachments/assets/323df482-1f05-4c69-8681-9bfb4073f766
Credits
- SAM3: Meta AI Research (https://github.com/facebookresearch/sam3)
- ComfyUI Integration: ComfyUI-SAM3
- Interactive Points Editor: Adapted from ComfyUI-KJNodes by kijai (Apache 2.0 License). The SAM3PointsEditor node is based on the PointsEditor implementation from KJNodes, simplified for SAM3-specific point-based segmentation.