Cam Shot Toolkit: Load SAM3 Person Detector
The SAM3 person detector that knows Meta's repo is gated
- person_detector
SAM 3D Body reconstructs one person at a time, so a photo with three people needs to be split into three crops before the mesh pass runs. This loader is how you tell the toolkit which detector does that splitting. It's optional - Process Image falls back to a built-in torchvision person detector when you don't wire one in - but it's the upgrade you reach for when the default detector starts guessing wrong, and it's the most fiddly node in the pack, entirely because Meta's SAM 3 repo is gated.
What it actually loads
The node's person_detector output feeds Process Image's optional person_detector input. The detector then finds each person, returns boxes, and Process crops around each one (with bbox_padding scaling the crop so limbs don't get chopped). SAM 3 is Meta's promptable segmentation model - the one that turns a text concept like "person" into masks for every matching instance in one pass. The gating twist: facebook/sam3 is access-gated, so repo_mode=auto (the default) tries the official repo first and silently falls back to an ungated mirror, jetjodh/sam3, if your access isn't approved. That mirror download is about 3.4 GB into ComfyUI/models/sam3_person_detector/, so the first run here is also a wait.
The inputs that matter
There are only a few you'll touch:
- implementation -
transformers_sam3(default, recommended),native_sam3(needs Meta's separatesam3package installed, and it pins numpy<2 which fights most ComfyUI envs), ortorchvision(the lightweight Faster R-CNN fallback, no 3.4 GB download). - repo_mode -
auto(default),official, ormirror. If you've accepted Meta's terms and logged in withhuggingface-cli loginorHF_TOKEN, auto will use the official repo; otherwise it lands on the mirror and works anyway. - prompt - the concept text SAM 3 searches for. Default
personis right for almost everyone. - bbox_padding - how much the crop grows around each detected box (1.0–2.0, default 1.2). Bump it if hands or feet are getting cut off in the mesh.
- mask_threshold - segmentation confidence for the SAM 3 post-processing (default 0.5). Only relevant on the transformers path.
Installation and gotchas
It's the same install as the rest of the pack - Manager search "Cam Shot Toolkit", or clone and pip install:
cd ComfyUI/custom_nodes
git clone https://github.com/EnviralDesign/sam3d-body-comfyUI-camshottoolkit
python -m pip install -r sam3d-body-comfyUI-camshottoolkit/requirements.txt
Restart, done. The two real gotchas: (1) this pack pins transformers>=5.0,<6, and the SAM 3 classes only exist in recent Transformers - if the node errors on import, your Transformers is old; (2) if you force repo_mode=official without a HF_TOKEN or a Hugging Face login that's been approved for SAM 3, you'll get a clear "could not resolve SAM3 person detector weights" error - flip to auto or mirror rather than fighting it.
When to actually use it
Honest take: for a single clean subject, skip this node entirely and let Process Image's torchvision fallback do the work - it's one less 3.4 GB download and it's plenty. Reach for it when a shot has multiple overlapping people, when the torchvision detector is misfiring, or when you want to tune the crop with prompt and bbox_padding. It's a quality-of-life switch, not a required part of the graph.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| implementation | COMBO | transformers_sam3 | Use Transformers SAM3 by default. native_sam3 requires Meta's sam3 package to be installed separately. |
| repo_mode | COMBO | auto | auto tries the official gated repo first, then an ungated mirror if access is unavailable. |
| prompt | STRING | person | Text concept prompt used by SAM3. |
| fallback_repo_id | STRING | jetjodh/sam3 | Ungated fallback mirror used when facebook/sam3 is gated or inaccessible. |
| bbox_padding | FLOAT | 1.201–2 | Scale detected boxes around their center before SAM3D Body crops them. |
| mask_threshold | FLOAT | 0.500–1 | Mask threshold used by Transformers SAM3 post-processing. |
| official_repo_idopt | STRING | facebook/sam3 | Official SAM3 repo. Uses your Hugging Face login/cache or HF_TOKEN if required. |
| checkpoint_filenameopt | STRING | sam3.pt | Checkpoint file used only by native_sam3. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| person_detector | SAM3D_PERSON_DETECTOR | — |