tongflow-modal-sam-3d-objects

July 4, 2026 · View on GitHub

Official TongFlow plugin. Single-image object 3D reconstruction with SAM 3D Objects (Meta, facebook/sam-3d-objects), running on a GPU via Modal.

Capabilities

  • Image → 3D (image-gen-model) — reconstruct full 3D shape, texture, and pose of the foreground object as a 3D Gaussian Splatting .ply. Robust to occlusion and clutter in natural photos. The object mask is computed automatically (rembg); an RGBA input uses its alpha channel as the mask instead.

Credentials

Add in TongFlow Settings (gear icon, top-right):

KeyRequiredNotes
MODAL_TOKEN_IDCreate at modal.com/settings/tokens.
MODAL_TOKEN_SECRETPaired with MODAL_TOKEN_ID.
HF_TOKENThe checkpoint is gated: request access on facebook/sam-3d-objects, then use that account's token.

On first use the plugin deploys to your Modal account automatically and caches the build (the first build compiles pytorch3d/gsplat and takes a while); weights are cached on a shared Modal volume.