bEpic Image Viewer SAM3 Collector
Click points, drag boxes, feed SAM 3 — without ever leaving the viewer
- image
- positive_points
- negative_points
- positive_bboxes
- negative_bboxes
Meta's Segment Anything 3 took over ComfyUI masking in late 2025 because a short noun phrase now returns a mask for every matching object at once. But the old-fashioned way still has its place: clicking a point or dragging a box to say this one, not that one. That's what bEpic Image Viewer SAM3 Collector exists for - it turns the viewer panel into a point-and-box prompt editor and hands the result to SAM3 as ready-made prompt objects.
Important framing up front: this node does not run SAM3. It's a collector. You still need the ComfyUI-SAM3 pack and a SAM3 checkpoint to do the actual segmentation. What this adds is a place to place your prompts - positive and negative clicks, positive and negative boxes - directly on the image, then have them come out the other end shaped exactly the way SAM3 expects. It's the "edit the mask by hand" half of a workflow, and for the fiddly cases where a text prompt grabs five things and you want one, that's genuinely useful.
How it works
The node pushes its input image into its own viewer tab. There, SAM3 tools let you drop positive points (include this), negative points (exclude this), and drag positive/negative boxes. Those get stored as normalized coordinates in hidden widgets, and on every run the backend converts them into SAM3's prompt format:
- Points become
{"points": [[x, y], ...], "labels": [1, 0, ...]}- label 1 for positive, 0 for negative. - Boxes are normalized to [0,1] top-left/bottom-right, then converted to SAM3's center format
[cx, cy, w, h]with boolean labels, matching what ComfyUI-SAM3's ownSAM3BBoxCollectoremits.
All four outputs exist from the moment the node is created; an untouched one is simply an empty prompt, which SAM3 treats as "no hint of this kind". So you can wire all four in and only fill the ones you use.
Inputs and outputs
- image - anything with pixels; it's what you click on.
- tab_name - which viewer tab the collection lives on.
- The four optional prompt widgets (
sam3_positive,sam3_negative,sam3_box_positive,sam3_box_negative) are hidden in the UI - the viewer writes them.
Outputs, in order: positive_points and negative_points (both SAM3_POINTS_PROMPT), then positive_bboxes and negative_bboxes (both SAM3_BOXES_PROMPT). Wire them into a SAM3 node's corresponding prompt inputs.
The one honest take
SAM3's headline trick is concept prompting - type "yellow school bus" and get every bus masked. This collector only does classic points and boxes, which is the pre-SAM3 interaction model. If you're a typer, this isn't your node; if you like clicking, it's excellent. Worth also knowing that SAM3's license is Meta's custom SAM Licence, not the Apache 2.0 that covered SAM and SAM 2 - fine for personal work, read the terms before shipping anything.
Installing
Same pack, same drill: ComfyUI Manager → search ComfyUI-ImageViewer → install → restart, or git clone https://github.com/szprivate/ComfyUI-ImageViewer into custom_nodes, pip install -r requirements.txt, restart. The pack itself only needs Pillow and numpy - the heavy lifting (the SAM3 model) comes from elsewhere, so don't expect this install to drag in gigabytes.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | * | — | |
| tab_name | STRING | — | |
| sam3_positiveopt | STRING | [] | — |
| sam3_negativeopt | STRING | [] | — |
| sam3_box_positiveopt | STRING | [] | — |
| sam3_box_negativeopt | STRING | [] | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive_points | SAM3_POINTS_PROMPT | — |
| negative_points | SAM3_POINTS_PROMPT | — |
| positive_bboxes | SAM3_BOXES_PROMPT | — |
| negative_bboxes | SAM3_BOXES_PROMPT | — |