SAM 3D Objects
The 'turn this one object into a 3D model' node
- image
- mask
- file_path
Full-frame 3D reconstruction is impressive but useless when you only care about the chair, not the room. This node is built around that distinction: you tell it which object matters - via a mask - and Meta's SAM-3D pipeline turns just that object into a textured GLB. It's the most "point at it" 3D node in the Runware pack, and the mask input is the superpower.
How it works
A 3dInference node with three required inputs, and they're all image-based:
image(IMAGE) - your source photo.mask(IMAGE) - a mask of the object you want reconstructed. Note the type: it's an IMAGE, not the MASK socket type, so your mask has to be an image (black background, white object). A MediaPipe mask node from this same pack, a hand-drawn mask, or a segmentation output all work as long as it lands as an IMAGE.positivePrompt(STRING) - what the object is. It's required, so even though the mask does most of the work, you still tell the model "a wooden chair."
Optional inputs are the usual pack plumbing: seed, numberResults (variations, each with its own seed), ttl/ttl_value, and outputFormat (locked to GLB). The model runs on Runware's cloud (Meta's SAM-3D), so there's no local mesh pipeline. Output is a file_path string - the GLB gets saved to your ComfyUI output folder, and the node points you at it.
The mask + prompt split is worth understanding before you run: the mask carves the object out of the scene, and the prompt tells the reconstructor what it's looking at so the mesh comes back recognizable. Get the mask right and the whole thing is magic; skimp on it and you'll get a lumpy amalgam of chair plus floor.
Install
One pack, all the Runware nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/Runware/ComfyUI-Runware
pip install -r ComfyUI-Runware/requirements.txt
Restart (or ComfyUI Manager → search "Runware"). Then a Runware API key: Settings → Runware API key, RUNWARE_API_KEY, or runware auth login.
Gotchas
3D inference is the priciest category in the pack - the title bar's cost readout will remind you, especially if you set numberResults above 1. The output is a file path, not a tensor, so wire it into a file/path consumer and find your GLB in the output folder. And the mask is IMAGE-typed: if you built a proper MASK somewhere else, convert it (core MaskToImage) before wiring in. A clean, tight mask is the difference between "nice, a chair" and "what is that".
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| mask | IMAGE | — | |
| positivePrompt | STRING | Text prompt describing elements to include in the generated output. | |
| seedopt | INT | 00–9223372036854776000 | Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range. |
| numberResultsopt | INT | 11–4 | Number of results to generate. Each result uses a different seed, producing variations of the same parameters. |
| ttlopt | BOOLEAN | false | Enable to set ttl. Off uses the model's default. |
| ttl_valueopt | INT | 60 | Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`. |
| outputFormatopt | COMBO | GLB | File format for the generated 3D model. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| file_path | STRING | — |