SAM 3 Smart Region Selector (FAL API)
SAM 3 Smart Region Selector — SAM 3 with training wheels, in the good way
- image
- mask
- mask_image
- info
- center_x
- center_y
- crop_width
- crop_height
The bare SAM 3 Image Segmenter makes you type a prompt. This one gives you a dropdown instead - face, upper_body, hair, glasses, hat, shirt, top, bra, pants, skirt, and more, plus a car/vehicle/wheel set - while keeping object available when you need custom text. Same FAL sam-3/image engine underneath, same output contract, just preset-driven.
If you're wondering which of the two SAM nodes to grab: this one. The presets are convenience, sure, but they're also the pack author's curated list of what people actually segment for garment and body retouching - which is this pack's entire specialty. The README's newest garment-detail workflow (08_sam3_garment_detail_seedream45_multistitch.json) uses these preset-driven selectors, and the API variant 09_... does too, so this is the node the pack's own recipes assume.
Inputs and flow
Required: image and region_type (the dropdown, default object). custom_text is required only when you pick object. Everything else mirrors the plain SAM node: selection_mode, padding_percent, return_rect_mask, mask_blur_percent, upload_max_dimension, return_multiple_masks/max_masks, include_scores/include_boxes, the JSON prompt escape hatches, and the api_key/api_key_env_var pair.
Outputs are identical to the Florence and SAM nodes: mask, mask_image, info, center_x, center_y, crop_width, crop_height. Drop-in compatible with Smart Object Isolate Crop, Smart Mask Crop, and NB2 Smart Region.
The depad rule, again
Because it produces SAM masks (exact source resolution, no internal letterboxing), the downstream crop nodes want depad_florence = False. The README calls this out specifically for SAM masks: keep depad_florence = true only for Florence-style masks. Copy the pack's example workflows and you'll see the setting in the right position - that's the easiest way to get it right the first time.
Install & keys
Same pack, same install:
cd ComfyUI/custom_nodes
git clone https://github.com/amortegui84/comfyui-inpaint-cropstitch-nb2
or search comfyui-inpaint-cropstitch-nb2 in ComfyUI Manager, restart. It's a FAL-backed node, so it needs the key - api_key input or FAL_KEY env var, set before launch with a full restart. On the first run you'll know the key is wrong by the 401 Unauthorized from storage/auth/token error; paste the key directly into the node to isolate it, then move to the env var.
Inputs (16)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| region_type | COMBO | object | 19 options: face, upper_body, lower_body, full_body, hair, glasses, +13 |
| custom_textopt | STRING | — | |
| selection_modeopt | COMBO | largest | 3 options: largest, first, merge_all |
| padding_percentopt | FLOAT | 0.00–100 | — |
| return_rect_maskopt | BOOLEAN | false | — |
| api_keyopt | STRING | — | |
| api_key_env_varopt | STRING | FAL_KEY | — |
| mask_blur_percentopt | FLOAT | 0.00–100 | Soft blur applied to the returned SAM mask. |
| upload_max_dimensionopt | INT | 2048512–4096 | — |
| return_multiple_masksopt | BOOLEAN | true | — |
| max_masksopt | INT | 31–32 | — |
| include_scoresopt | BOOLEAN | true | — |
| include_boxesopt | BOOLEAN | true | — |
| point_prompts_jsonopt | STRING | — | |
| box_prompts_jsonopt | STRING | — |
Outputs (7)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |
| mask_image | IMAGE | — |
| info | STRING | — |
| center_x | INT | — |
| center_y | INT | — |
| crop_width | INT | — |
| crop_height | INT | — |