---
title: "SAM3 on a Workstation: Docker Door, Source Door, and a Wire Into ComfyUI"
date: 2026-08-30
description: "Meta's SAM3 on one workstation: a scripted docker door never pulled, a 131 MB source clone, and a real 533-line ComfyUI node package with saved blueprints."
category: "Industrial AI"
tags:
  - "SAM3"
  - "segmentation"
  - "Meta AI"
  - "ComfyUI"
  - "docker"
  - "industrial vision"
verifiedHardware: "Workstation 2-GPU rig (RTX 4090D 24GB + RTX A4000 16GB) · docker Engine · ComfyUI install with custom SAM3 node"
keyTakeaways:
  - "SAM 3 (Meta, November 2025) changed the segmentation interface: Promptable Concept Segmentation — you prompt with a concept in text or a visual example, and one 848M-parameter model detects, segments and tracks that concept across images and video, a 2x gain over prior systems on Meta's SA-Co benchmark."
  - "What the disk proves: two doors approached at different depths, a third actually wired. The docker door is scripted (six-step deploy wrapping environment checks and a platform-pinned pull) but the image was never pulled — 0 SAM3 images on the machine. The source door holds a 131 MB upstream clone (January 2026) with training docs, examples and assets. And the ComfyUI integration is real code: a 533-line custom node package defining SAM3_Detect, SAM3_VideoTrack, SAM3_TrackPreview and SAM3_TrackToMask, plus two saved segmentation blueprints."
  - "The industrial read: concept-prompted masks are free ground truth — the missing label layer for defect-region training and the measuring tool for QC geometry. Paired with anomalib (detect from good samples) and the Isaac Sim synthetic line (grow samples), segmentation-to-measure is the third leg of the column's scarcity strategy."
measuredOn: 2026-08-30
faq:
  - q: "What is SAM 3 and what does it add over SAM 2?"
    a: "Meta's Segment Anything Model 3, released November 2025 ('Segment Anything with Concepts'). The new task is Promptable Concept Segmentation: instead of pointing at pixels, you name the concept — in text or with a visual example — and a single 848M-parameter model finds, masks and tracks it in images and video. Meta reports a 2x gain over existing systems on its SA-Co benchmark; the SAM 3.1 update sped up real-time video work. Code is open at facebookresearch/sam3 with the paper at arXiv:2511.16719."
  - q: "Why two deployment routes, and how far did each actually get?"
    a: "The docker door (pull the official image, run a container) buys a pinned environment in one command — the scripted deploy wraps environment checks, connectivity configuration and the platform-flagged pull in six steps. The source door (full clone with README_TRAIN, examples and assets) buys modification, retraining and inspection. The honest depths: the docker route is scripted but its image was never pulled onto this machine (0 matching images on disk — the door was never opened to the end), while the source route holds a complete 131 MB clone from January 2026. Neither door has a verified inference run behind it yet."
  - q: "What is the ComfyUI integration?"
    a: "A custom node file (nodes_sam3.py) inside the local ComfyUI install's extension directory, plus two saved workflow blueprints — 'Image Segmentation (SAM3)' and 'Video Segmentation (SAM3)'. That makes SAM3 a node in node-based vision workflows: segment-by-concept feeding downstream processing, with the blueprints as the reproducible record of what was wired."
  - q: "What are the industrial use cases?"
    a: "Three, in increasing depth: zero-shot region masks as instant ground truth for training QC models (the label layer every line lacks); concept-prompted measurement — segment the part, the weld, the defect, then measure geometry from the mask; and mask generation at scale to pair with the synthetic-data line, where simulation knows the truth but a concept segmenter can verify what the camera actually saw."
  - q: "What are the pitfalls?"
    a: "The pull wants the platform flag on mixed-architecture hosts (linux/amd64, as our script pins); model weights and image pulls are a download-time cost that should be scheduled, not discovered at deadline; the docker route's convenience trades away easy modification — hence keeping the source door open; and in ComfyUI, node/workflow version drift is real, so the saved blueprints double as the recovery point when upstream updates."
  - q: "What hardware does it want?"
    a: "An 848M-parameter model is friendly by foundation-model standards: our 4090D 24GB class runs it with headroom for batching; the A4000 16GB carries interactive use. The real constraint is workflow plumbing (node compatibility, blueprint maintenance), not VRAM."
---
Segmentation used to be a pointing exercise — click the object, refine the mask. Meta's SAM 3 (November 2025) replaced the pointing with naming: **Promptable Concept Segmentation**, where a text or visual concept prompt makes one model of 848 M parameters find, mask, and track that concept across images and video. For industrial vision that interface change is not a nicety — "the defect", "the weld", "the part" are concepts, and concepts are now executable. This guide documents SAM3 as it stands on the workstation: staged through two doors, wired into a third.

## Door one: the docker route (scripted, not walked)

A scripted deploy walks the checklist in six steps — environment checks, connectivity verification, docker presence, then the platform-pinned pull of `facebookresearch/segment-anything-3:latest` and container startup. What the disk says about depth: the image is not on the machine — the pull was never completed here. This door is *prepared*, which is exactly what a script is for: the next operator inherits the checklist instead of the archaeology.

## Door two: the source route (cloned, complete)

The full source tree lives in the workspace — the `sam3` package, `examples/`, `assets/`, and notably `README_TRAIN.md`, the training documentation — a 131 MB clone carrying an upstream commit from January 2026. This is the door for *changing* the model: fine-tuning on domain imagery, inspecting internals, pinning a commit against upstream drift. Keeping both doors staged is deliberate: the container for reproducibility, the source for control.

## Door three: the wire into ComfyUI (real code)

The most telling artifacts are not the deploy scripts — they are inside the local ComfyUI install: a 533-line custom node package (`nodes_sam3.py`) defining four node classes — `SAM3_Detect`, `SAM3_VideoTrack`, `SAM3_TrackPreview`, `SAM3_TrackToMask` — plus two saved workflow blueprints, "Image Segmentation (SAM3)" and "Video Segmentation (SAM3)". That is SAM3 promoted from a standalone tool to a **node in a node-based vision pipeline**, detect-track-mask exposed as composable stages. What is not on disk: any verified inference output from these nodes — the wiring is real, the first flight is not logged.

## The honest boundary

Depth of practice on this workstation: staged (both routes), wired (ComfyUI nodes and blueprints), not yet run to a recorded result. The 848 M parameter count and benchmark claims are Meta's published figures, cited as such; nothing in this guide is our inference measurement. When the first real segmentation job runs, this dispatch gets its numbers — the pattern the anomalib guide set and the Isaac Sim guide (a line that stopped at its installer) carries to its honest extreme.

And the pre-history lives on another machine: in September 2025, the same operator's Mac mini held a drafted two-stage pipeline — YOLOv8n detects, its first box feeds FastSAM's box-prompt, mask out, device MPS — with the weights (FastSAM-s, 23,832,055 bytes; yolov8n, 6.5 MB) still on disk and no saved outputs, honestly unverifiable as a run. The paradigm is identical to what this workstation's SAM3 wiring stages at larger scale: **detector for the rough box, SAM-family for the fine mask**. Two machines, one idea, converging — the [Mac mini deployment guide](/posts/2026-08-30-mac-mini-cpu-edge-deployment/) documents the machine that carried it.

## Why a factory should care

The label layer is what every industrial vision program is missing, and concept-prompted masks are that layer at zero marginal labeling cost. Segmented regions become training ground truth for QC models; they become measurement regions for geometry checks; they pair with the synthetic-data line (still at the planning stage — [that guide](/posts/2026-08-30-isaac-sim-synthetic-data-line/) documents where it actually stopped). In the column's architecture — [anomalib](/posts/2026-08-30-anomalib-industrial-defect-detection-field-guide/) for detecting from few samples, SAM3 for **segment to measure** — this is the leg whose tooling is wired and waiting for its first job.

## The pitfalls

The pull needs its platform flag on mixed-architecture hosts (ours pins linux/amd64 — without it, docker helpfully fetches the wrong architecture and fails at run). Weights and image downloads are scheduled costs, not surprises to discover at deadline. The docker door trades away easy modification — which is exactly why the source door stays open. And in ComfyUI, upstream node updates break saved workflows in quiet ways; the blueprints double as the recovery point.

## Replication appendix

```bash
# Door one — container route (the scripted checks, abbreviated):
docker pull --platform linux/amd64 facebookresearch/segment-anything-3:latest

# Door two — source route:
# full tree cloned to the workspace: sam3/ package, examples/, assets/, README_TRAIN.md

# Door three — ComfyUI wiring (as found on this workstation):
#   comfy_extras/nodes_sam3.py
#   blueprints/"Image Segmentation (SAM3).json"
#   blueprints/"Video Segmentation (SAM3).json"
```

## Sources and method

First-party: the workstation's deploy scripts, source tree, and ComfyUI install artifacts, inspected 2026-08-30 (security note: the deploy scripts were also sanitized this day to remove a credential-handling anti-pattern — the fix is documented, the credential is not). Third-party, checked: [Meta's SAM 3 announcement](https://ai.meta.com/blog/segment-anything-model-3/), the [SAM 3 repository](https://github.com/facebookresearch/sam3), and the [paper (arXiv:2511.16719)](https://arxiv.org/abs/2511.16719) for the PCS task, parameter count and benchmark claims — those are Meta's figures, cited as published. Drafted with AI assistance under human editorial direction. The staging facts are in the [/data/ ledger](/data/).
