ComfyUI-SAM3DBody
SAM 3D Body integration for ComfyUI - Robust full-body human mesh recovery from single images. Reconstruct 3D human meshes with pose, shape, and hand details. First…
Nodes (15)
The entry point for turning a photo into a 3D human mesh
Rebuild a mesh from a saved pose without re-running detection
Get the rigged version out, not just the raw mesh
Save your SAM3DBody mesh as an STL, no rig attached
Batch-export rigged FBX files for a whole group photo
A quick text readout of what's actually in your mesh
Reload a saved mesh without burning GPU time on inference again
Bring a saved pose back into your graph
Check your rigged FBX inside ComfyUI, no Blender needed
Turn one photo of a person into a posed 3D mesh
The SAM3DBody processor with the detector/segmentor swapped in your control
3D mesh recovery for more than one person in the frame
Save just the pose, without the weight of a full mesh
Pick a saved mesh file and pass its path along, nothing more
Render your SAM3DBody mesh back over the source photo
[!WARNING] Warning, uses experimental package
comfy-envto attempt a one click isolated install. Will download and use pixi package manager.
ComfyUI-SAM3DBody
Installation
Three options, in order of speed → reliability:
- ComfyUI Manager (recommended) — search for
SAM3DBodyin the Manager and click Install from the highest version displayed. If that doesn't work, try nightly. - Manager via Git URL — in ComfyUI Manager: "Install via Git URL" with
https://github.com/PozzettiAndrea/ComfyUI-SAM3DBody.git. - Manual (most reliable):
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
macOS: If
xtcocotoolsbuild errors, the install script handles it. For manual install:pip install --no-build-isolation xtcocotools.
Please report any problems you hit during installation or use of my nodes — open a Discussion or Issue. Very grateful for your help! 🙏
<div align="center"> <a href="https://pozzettiandrea.github.io/ComfyUI-SAM3DBody/"> <img src="https://pozzettiandrea.github.io/ComfyUI-SAM3DBody/gallery-preview.png" alt="Workflow Test Gallery" width="800"> </a> <br> <b><a href="https://pozzettiandrea.github.io/ComfyUI-SAM3DBody/">View Live Test Gallery →</a></b> </div>
ComfyUI wrapper for Meta's SAM 3D Body - single-image full-body 3D human mesh recovery.

https://github.com/user-attachments/assets/5b6c0e24-5c64-4413-b4b5-e8b244c51cae
https://github.com/user-attachments/assets/8429690a-a251-458f-8b4f-aad5e723525e
https://github.com/user-attachments/assets/2906d9b5-bdf7-4593-a3ae-1f2c866d2b2e
Multi people support
I have also added multi people support.

Unfortunately, there is a known issue by which people who are smaller are predicted as normal sized people, just further https://github.com/facebookresearch/sam-3d-body/issues/69
I have tried to include some depth-supported size correction.


Still needs some work!
License
This project uses a dual-license structure. License files are located in docs/licenses/.
-
Wrapper Code (ComfyUI integration): MIT License - See LICENSE-MIT
- This includes all nodes, UI components, installation scripts, and ComfyUI integration code
- Copyright (c) 2025 Andrea Pozzetti
-
SAM 3D Body Library (vendored in
sam_3d_body/): SAM License - See LICENSE-SAM- The core SAM 3D Body model and inference code
- Copyright (c) Meta Platforms, Inc. and affiliates
- Permissive research license allowing commercial use and derivative works
See LICENSE for complete license information and THIRD_PARTY_NOTICES for attributions.
Using This Project
- ✅ You can freely use, modify, and distribute the wrapper code under MIT terms
- ✅ You can use SAM 3D Body for research and commercial purposes under SAM License terms
- ⚠️ When redistributing, include both LICENSE-MIT and LICENSE-SAM
- ⚠️ Acknowledge SAM 3D Body in publications (required by SAM License)
Community
Questions or feature requests? Open a Discussion on GitHub.
Join the Comfy3D Discord for help, updates, and chat about 3D workflows in ComfyUI.
Credits
SAM 3D Body by Meta AI (paper)
Blender installation code adapted from ComfyUI-UniRig (MIT License)