ComfyUI Node
Sign Selector SAM3
Finds signs, labels, prints and other text-bearing regions with SAM3 text grounding. Nine built-in classes (sign, label, garment_print, poster, screen, book, plate, paper, graffiti), each with its own prompts, threshold and minimum size. All classes share ONE SAM3 vision encode per image, so enabling all nine is cheap. Regions below the size gate are flagged too_small rather than dropped — the Detailer decides whether to skip them or soften them into believable out-of-focus text. When an OCR backend is installed, each region also gets a slop score: SAM3 saying 'there is text here' while OCR reads nothing is the classic pseudo-glyph signature. Connect LoadSAM3Model -> sam3_model. Feed sign_data into Sign Text Proposer.
Sign Selector SAM3
- sam3_model
- image
- restrict_mask
- sign_data
- masks
- crops
- preview
- region_count
- report
◄class_signtrue►
◄class_labeltrue►
◄class_garment_printtrue►
◄class_postertrue►
◄class_screentrue►
◄class_booktrue►
◄class_platetrue►
◄class_papertrue►
◄class_graffititrue►
◄custom_prompts►
◄threshold_scale1.00►
◄min_height_px24►
◄min_area_ratio0.0005►
◄max_regions12►
◄merge_iou0.50►
◄slop_detectionocr►
◄slop_threshold0.50►
◄only_slopfalse►
◄cluster_similartrue►
◄cluster_distance0.15►
◄sort_orderarea_desc►
◄ocr_backendauto►
CategoryFVM Tools/Text
Inputs (25)
| Name | Type | Default | Description |
|---|---|---|---|
| sam3_model | SAM3_MODEL_CONFIG | SAM3 model from the LoadSAM3Model node | |
| image | IMAGE | Image(s) to scan for text regions. Batch supported. | |
| class_sign | BOOLEAN | true | Ground 'sign' — prompts: sign, street sign, shop sign (default threshold 0.3, min height 32px) |
| class_label | BOOLEAN | true | Ground 'label' — prompts: bottle label, product label, packaging label (default threshold 0.28, min height 24px) |
| class_garment_print | BOOLEAN | true | Ground 'garment_print' — prompts: printed text on clothing, t-shirt print, logo on shirt (default threshold 0.3, min height 40px) |
| class_poster | BOOLEAN | true | Ground 'poster' — prompts: poster, banner, billboard (default threshold 0.28, min height 40px) |
| class_screen | BOOLEAN | true | Ground 'screen' — prompts: phone screen, computer monitor, display screen (default threshold 0.3, min height 32px) |
| class_book | BOOLEAN | true | Ground 'book' — prompts: book cover, magazine cover (default threshold 0.3, min height 32px) |
| class_plate | BOOLEAN | true | Ground 'plate' — prompts: license plate (default threshold 0.35, min height 20px) |
| class_paper | BOOLEAN | true | Ground 'paper' — prompts: document, menu, price tag, receipt (default threshold 0.28, min height 24px) |
| class_graffiti | BOOLEAN | true | Ground 'graffiti' — prompts: graffiti, handwritten text (default threshold 0.3, min height 40px) |
| custom_prompts | STRING | Extra SAM3 prompts beyond the built-in classes. Format: 'neon sign:0.25, bottle label:0.3' — the threshold is optional. | |
| threshold_scale | FLOAT | 1.000.3–2 | Multiplies every class's default threshold. Below 1.0 finds more (and more false positives), above 1.0 is stricter. |
| min_height_px | INT | 244–512 | Global floor for text height in the ORIGINAL image (min-area-rect short side). Per-class minimums still apply on top of this. |
| min_area_ratio | FLOAT | 0.00050–0.5 | Region must cover at least this fraction of the image area. |
| max_regions | INT | 121–100 | Cost brake — keeps only the top N regions after sorting. |
| merge_iou | FLOAT | 0.500–1 | Two classes hitting the same object are merged above this IoU. The higher-scoring detection keeps its class. |
| slop_detection | COMBO | ocr | How to judge whether existing lettering is believable. - ocr: OCR confidence + dictionary + bigram plausibility - vlm: leave the judgement to the Proposer's vision model - ocr+vlm: both, combined in the Proposer Falls back gracefully when no OCR backend is installed. |
| slop_threshold | FLOAT | 0.500–1 | Regions scoring at or above this are marked as needing a re-render. |
| only_slop | BOOLEAN | false | ON: drop regions whose text already looks fine. OFF: keep everything and let the Detailer decide. |
| cluster_similar | BOOLEAN | true | Group near-identical regions (a shelf of identical bottles) so they share one text decision. |
| cluster_distance | FLOAT | 0.150.01–0.9 | Lower = stricter grouping. Combines perceptual hash and colour signature. |
| sort_order | COMBO | area_desc | Order of regions — also the order in which the Detailer renders them. |
| restrict_maskopt | MASK | Only search inside this mask. Regions must overlap it by 30%+. | |
| ocr_backendopt | COMBO | auto | OCR engine for slop detection. 'auto' picks the first installed one. Missing models degrade to VLM-only judgement, never an error. |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| sign_data | SIGN_DATA | — |
| masks | MASK | — |
| crops | IMAGE | — |
| preview | IMAGE | — |
| region_count | INT | — |
| report | STRING | — |