ComfyUI integration for Meta's SAM3 (Segment Anything Model 3). Open-vocabulary image and video segmentation using natural language text prompts.
This node does a little more setup than a typical custom node.
SAM3 needs two extra libraries to run in vanilla ComfyUI, cc-torch and torch-generic-nms, plus flash-attn as an optional speedup when it is available on your system.
After you add the repo to ComfyUI, the first launch will finish setup automatically inside your ComfyUI Python environment.
The installer tells you what it is about to do, then tells you what finished, so you can follow the whole setup as it runs via the console.
The install script does three things:
-
Installs these extra prebuilt wheels outside
requirements.txt:Extra wheel ComfyOrg Hosting 3rd Party Hosting cc-torchComfy-Org/wheels cc_torch-latestPozzettiAndrea/cuda-wheels cc_torch-latesttorch-generic-nmsComfy-Org/wheels torch_generic_nms-latest(Coming Soon!)PozzettiAndrea/cuda-wheels torch_generic_nms-latestflash-attnComfy-Org/wheels flash_attn-latest(Coming Soon!)PozzettiAndrea/cuda-wheels flash_attn-latest -
Copies these bundled example files into your ComfyUI
input/directory:Source file in this repo Copied to Removed by uninstall.pyassets/bedroom.mp4ComfyUI/input/bedroom.mp4Yes assets/example_image.jpgComfyUI/input/example_image.jpgYes assets/groceries.jpgComfyUI/input/groceries.jpgYes assets/image.pngComfyUI/input/image.pngYes -
Writes an install receipt that the uninstall tool uses to remove only installer-owned artifacts
If you want to uninstall the extra packages and files SAM3 adds, the uninstaller is in the root of this custom node:
cd /path/to/ComfyUI/custom_nodes/ComfyUI-SAM3
./uninstall.pyThe uninstaller prints each removal step as it runs. It removes the three extra wheels, removes the example files listed above from ComfyUI/input/, and removes its install receipt.
sam3.mp4
- 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.



