Nodes/comfyui-superside-nodes/Superside SAM 3 Smart Region Selector
ComfyUI Node

Superside SAM 3 Smart Region Selector

Tell SAM 3 'the left earbud' and Get a Mask Back, Thanks to fal

By Superside·Created about a month ago·Updated 3 days ago· 1
Superside SAM 3 Smart Region Selector
  • image
  • mask
  • mask_image
  • info
  • center_x
  • center_y
  • crop_width
  • crop_height
region_typeobject
api_key
custom_text
selection_modelargest
padding_percent0.0
return_rect_maskfalse
return_multiple_maskstrue
max_masks3
include_scorestrue
include_boxestrue

A trained YOLO detector can only find what it was trained on. SAM 3 - Meta's open-vocabulary segmentation model - can mask almost anything you can name, which is why it became the default "select this thing" tool in 2026 ComfyUI graphs. The catch is that running SAM 3 locally wants real GPU and, on some setups, Triton pain on Windows. This node skips all of that: it sends your image and a text prompt to SAM 3 over fal.ai and drops a clean MASK back into your graph.

What it's for

The job is "select one semantic region" - a face, a shirt, a car part, a custom object you describe in words. That mask then feeds whatever needs it: an inpaint region, an exclusion mask, a crop. The pack's README positions it as the broad-vocabulary selector, going beyond the sibling Florence-2 selector into garments, vehicle parts, and accessories. Because it's SAM 3's open-vocabulary text segmentation (the same model behind the fal-ai/sam-3/image endpoint), you can name things a fixed detector never saw.

How it works

You pick a region_type from 19 presets (face, upper_body, hair, glasses, shirt, pants… defaulting to object) or type your own into custom_text. The node calls SAM 3 with that phrase, gets back masks, and merges or selects them according to selection_mode: largest (default) keeps the biggest instance, first the top-scored, merge_all keeps every instance. max_masks caps how many come back, include_scores/include_boxes control whether the info JSON carries them, and padding_percent grows the result outward.

There's a neat detail in the README: the selector can also accept an upstream Florence-2 selector's box to hand SAM 3 exactly where to look - the old GroundingDINO-plus-SAM two-stage pattern, useful for sub-parts like a glasses frame without the lens, where text alone might find and segment imprecisely.

Outputs that matter

  • mask (MASK) - the region, ready for masking/inpainting/compositing nodes.
  • mask_image (IMAGE) - the mask as a viewable image.
  • info (STRING) - JSON with scores/boxes.
  • center_x, center_y, crop_width, crop_height (INTs) - the region's center and size. These are the keys to the pack's crop-edit-stitch pair: wire them into Superside Crop By Region.

Installing it

Part of comfyui-superside-nodes - install the pack, restart, done:

cd ComfyUI/custom_nodes
git clone https://github.com/Superside/comfyui-superside-nodes.git
cd comfyui-superside-nodes
pip install -r requirements.txt

Then paste your fal api_key into the node. No model downloads - SAM 3 runs on fal's servers; the api_key is what pays for it.

Common issues and honest caveats

Three things to keep in view. First, cost and privacy: every run is a pay-per-call to fal, and your image + prompt leave your machine - the standard trade of any API-wrapper node in this pack. Second, open-vocabulary segmentation is slightly less crisp at boundaries than a purpose-trained face parser; the pack's own docs say as much about its portrait-sections node. Third, merge_all can catch far more instances than you expect on a busy image - if a mask comes back with a dozen blobs, drop to largest or first. And if you're on a normal install that can run SAM 3 locally, the local ComfyUI nodes are free after electricity; this node is the version you choose for zero local setup, not necessarily the cheapest per use.

CategorySuperside

Inputs (11)

NameTypeDefaultDescription
imageIMAGE
region_typeCOMBOobject19 options: face, upper_body, lower_body, full_body, hair, glasses, +13
api_keySTRING
custom_textoptSTRING
selection_modeoptCOMBOlargest3 options: largest, first, merge_all
padding_percentoptFLOAT0.00–100
return_rect_maskoptBOOLEANfalse
return_multiple_masksoptBOOLEANtrue
max_masksoptINT31–32
include_scoresoptBOOLEANtrue
include_boxesoptBOOLEANtrue

Outputs (7)

NameTypeDescription
maskMASK
mask_imageIMAGE
infoSTRING
center_xINT
center_yINT
crop_widthINT
crop_heightINT