Nodes/ComfyUI-SAM3DBody/SAM 3D Body: Process Image (Advanced)
ComfyUI Node

SAM 3D Body: Process Image (Advanced)

The SAM3DBody processor with the detector/segmentor swapped in your control

By PozzettiAndrea·Created 9 months ago·Updated 2 months ago· 321
SAM 3D Body: Process Image (Advanced)
  • model
  • image
  • mask
  • mesh_data
  • skeleton
  • debug_image
bbox_threshold0.80
nms_threshold0.30
inference_typefull
detector_namenone
segmentor_namenone
fov_namenone
detector_path
segmentor_path
fov_path

Same job as SAM3DBodyProcess - one photo in, a posed 3D mesh out - but with the internals exposed instead of hidden behind sensible defaults. SAM3DBodyProcessAdvanced is what you reach for when the plain node's detector picks the wrong bounding box, its NMS setting merges or splits detections badly, or you actually have your own detector/segmentor/FOV-estimation weights you want to try instead of the pack's built-ins. For a straightforward single clean photo, you don't need this - use SAM3DBodyProcess and save yourself the extra knobs.

SAM 3D Body reconstructs a full-body 3D mesh from one image by first finding the person (detection), isolating them (segmentation), and estimating the camera's field of view to get proportions right - three separate sub-steps bundled invisibly inside the plain Process node. This one pulls all three into the open.

How it works

Where SAM3DBodyProcess just has a detection threshold, this node adds a second filtering pass (nms_threshold, non-max suppression) to control how overlapping detections get collapsed or kept, plus three optional override slots - detector, segmentor, and field-of-view model - each with a name/path pair defaulting to none, meaning "use the pack's built-in." You only touch those if you've got alternative weights and know what you're doing; leave them alone otherwise and this behaves like the plain Process node with two extra thresholds.

The inputs and outputs that matter

  • model (SAM3D_MODEL) and image (IMAGE) - same as every Process variant.
  • bbox_threshold (default 0.8) - detection confidence, same knob as the plain node.
  • nms_threshold (default 0.3) - controls how aggressively overlapping bounding boxes get merged. Lower it if you're getting one detection split into two; raise it if two genuinely separate people are being collapsed into one.
  • inference_type (default full) - leave on default unless you have a specific reason.
  • detector_name / detector_path, segmentor_name / segmentor_path, fov_name / fov_path - three swap-in slots, all defaulting to none. Advanced users only; this is the escape hatch for a specific bad-detection case, not a knob to reach for by habit.
  • mask (MASK, optional) - same as SAM3DBodyProcess, hand it a pre-made mask to skip the built-in detector entirely.

Outputs match the plain node exactly: mesh_data (SAM3D_OUTPUT), skeleton (SKELETON), and debug_image (IMAGE) for a quick visual check before you commit to exporting anything.

How to install it

Via ComfyUI Manager, search SAM3DBody, install, restart. Or manually:

cd ComfyUI/custom_nodes
git clone https://github.com/PozzettiAndrea/ComfyUI-SAM3DBody.git
cd ComfyUI-SAM3DBody
pip install -r requirements.txt --upgrade
python install.py

Same requirement as the plain Process node: you need LoadSAM3DBodyModel upstream, and that node is the one that hits Meta's gated Hugging Face checkpoint - approve access there first if you haven't already.

Common issues & troubleshooting

Two knobs both affect detection, and it's easy to tune the wrong one. If people are being missed, that's bbox_threshold - lower it. If detections of the same person are getting duplicated or a crowd is being merged into fewer boxes than there actually are, that's nms_threshold - nudge it rather than touching detection confidence.

Overrides silently do nothing. If you fill in a detector_path but leave detector_name on none, don't expect it to pick up your custom weights - the name field is what selects which override slot is actually active. Set both together.

Still nude, still no texture. Same as the plain node - this outputs shape and pose, not clothing or surface detail, regardless of which detector/segmentor combination you feed it. If you were hoping Advanced mode buys you a textured result, it doesn't; that's outside what SAM 3D Body does.

Not sure whether you actually need this node. If debug_image out of the plain SAM3DBodyProcess already shows a clean detection, switching to Advanced buys you nothing - it's specifically for fixing a bad bounding box or bad mask, not a general quality upgrade.

CategorySAM3DBody/advanced

Inputs (12)

NameTypeDefaultDescription
modelSAM3D_MODELLoaded SAM 3D Body model from Load node
imageIMAGEInput image containing human subject
bbox_thresholdFLOAT0.800–1Confidence threshold for human detection
nms_thresholdFLOAT0.300–1Non-maximum suppression threshold for detection
inference_typeCOMBOfullInference mode: full (body+hand), body only, or hand only
detector_nameCOMBOnoneHuman detector to use (requires detector_path)
segmentor_nameCOMBOnoneSegmentation model to use (requires segmentor_path)
fov_nameCOMBOnoneFOV estimator to use (requires fov_path)
detector_pathoptSTRINGPath to detector model or set SAM3D_DETECTOR_PATH env var
segmentor_pathoptSTRINGPath to segmentor model or set SAM3D_SEGMENTOR_PATH env var
fov_pathoptSTRINGPath to FOV model or set SAM3D_FOV_PATH env var
maskoptMASKOptional pre-computed segmentation mask

Outputs (3)

NameTypeDescription
mesh_dataSAM3D_OUTPUT
skeletonSKELETON
debug_imageIMAGE