EasySAM3 Segment
The node that turns 'the red jacket' into a mask
- image
- MASK
- IMAGE
You've got an image and you want to change one thing in it - swap the jacket, repaint the car, cut the person out and drop them somewhere else. The old way was GroundingDINO to find the object, then SAM to turn its box into a mask. This node collapses that into one step: type "red jacket, person" into a text box, hit run, and out comes a clean mask. That's EasySAM3 Segment, and it's the node that does the actual work in the ComfyUI-EasySAM3 pack.
The "SAM3" is Meta's third-generation Segment Anything, and the key upgrade is that it's semantic - it can segment from a text description directly, no separate detector in front of it. This pack runs it through Ultralytics, so you don't have to juggle two custom nodes to get a text-prompted mask. In the segmentation-vs-matting world this is the targeted-selection tool, not a background remover: it's for "this specific object," which then feeds inpainting, regional generation, or compositing. Use rembg or BiRefNet for plain cutouts; use this when you need to pick out a thing.
Installing it
ComfyUI Manager is the easy path - search "ComfyUI-EasySAM3" and let it handle the rest. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/lihaoyun6/ComfyUI-EasySAM3.git
python -m pip install -r ComfyUI-EasySAM3/requirements.txt
One warning: the README's own pip line is missing the -r flag (pip install ComfyUI-EasySAM3/requirements.txt), which just errors. The command above is the one you want. Dependencies are ultralytics>=8.3.237, modelscope, tqdm, and pillow - ultralytics drags in opencv and the rest. The version pin matters: the pack imports the SAM3*Predictor classes straight from ultralytics at load time, and if yours is older than 8.3.237 those classes don't exist and the whole pack fails to import. That's the #1 cause of "install went fine, ComfyUI won't start."
The other thing nobody tells you: the model isn't a separate download step. On your first run it pulls sam3.pt from ModelScope (Alibaba's hub, not HuggingFace) into ComfyUI/models/sam3/. It's a multi-gigabyte transformer, so the first execution looks like the node is frozen for a while - it's not, it's downloading. Give it a minute or two, and blame ModelScope (not this pack) if it crawls.
Inputs and outputs
The required inputs are the whole story:
- image - any IMAGE tensor. Feed it a single image and it segments once.
- prompt - comma-separated text prompts, e.g.
red jacket, person on the left. Multiple prompts merge their masks. - threshold (default 0.45) - confidence cutoff for a pixel counting as the object. Bump it up if you're getting junk, down if it's missing the real object.
- object_id (default -1) - with
-1it merges all detected objects into one mask. Give it a number to isolate a single object. - visualize (default true) - controls the second output.
There are also two optional inputs, pos_points and neg_points, which are what the pack's point editor feeds in (more below).
Outputs are MASK and IMAGE. The MASK is the thing you actually use - wire it into a SetLatentNoiseMask followed by a KSampler for masked inpainting, or use it with Impact Pack's FaceDetailer-style nodes. The IMAGE is just the segmentation preview overlay (a black image if visualize is off).
The video trick
Feed it more than one frame and it silently switches to SAM3's video predictors and does object tracking: object_id becomes a track ID, so you can mask "the person on the left" across a whole clip. That's genuinely rare in a two-node pack and it's what makes the thing useful for video object removal. Just know it's heavy - every frame goes through a large model, so budget your VRAM accordingly. It also runs half=True (fp16), so this needs a real GPU; a CPU-only box is going to have a bad day.
Where people get burned
- Empty prompt + no points = hard error. The node raises "You must provide any text or point prompts!" An empty prompt is not "everything" - give it words or click points.
- Old ultralytics breaks startup. If the pack won't import after installing,
pip install -U ultralyticsis usually the fix. - It may already be redundant. ComfyUI shipped native SAM3 nodes in 2026 (the "you don't need it" answer is the top reply on any recent EasySAM3 help thread). If your ComfyUI is current, check the core node list before installing - EasySAM3's remaining edge is the point editor and the video tracking.
It's a small, focused pack that does one job cleanly. If you need text-prompted masks without wiring up a detector, it's the easiest way to get them.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| prompt | STRING | Supports multiple text prompts, separated by commas (,) | |
| threshold | FLOAT | 0.450–1 | — |
| object_id | INT | -1-1–1024 | ID of the masked object, -1=all |
| visualize | BOOLEAN | true | Output segmentation preview image |
| pos_pointsopt | STRING | — | |
| neg_pointsopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| MASK | MASK | — |
| IMAGE | IMAGE | — |