// the find
kijai/ComfyUI-segment-anything-2
ComfyUI nodes to use segment-anything-2
ComfyUI custom nodes that wrap Meta's SAM2 (segment-anything-2) model, bundling both the image and video predictors so you can do point/box-prompted segmentation and video object tracking directly inside a ComfyUI graph. It's for ComfyUI users doing masking, rotoscoping, or compositing work who want SAM2 without a separate pipeline.
Ships both sam2_image_predictor.py and sam2_video_predictor.py, so video segmentation isn't bolted on - it's a real part of the package, not just frame-by-frame image masking. Includes working example workflows (points_segment_video_example.json, image_batch_bbox_segment.json) that show exact node wiring instead of leaving you to reverse-engineer it. Models auto-download from HuggingFace on first run into the expected folder, so there's no manual checkpoint hunting. Vendors the actual SAM2 modeling code (backbones, memory attention/encoder) rather than depending on an external package, so one install gets you everything.
The README opens with "WORK IN PROGRESS" and "For testing only currently" - this is explicitly not production-stable, and the point/coordinate selector is called out by the author as needing a better UI. Mask postprocessing is disabled because it requires CUDA extension compilation the author didn't want to maintain, so you lose hole-filling and small-region cleanup unless you chain in another node for it. No test suite and no meaningful CI (just a publish workflow), so regressions rely on the author or users catching them manually. Tracks an upstream research repo (facebookresearch/segment-anything-2) that itself moves fast, which is a maintenance burden with no clear update cadence stated.