Nodes/Atlas Camera/Atlas SAM3 Mask πŸͺ„
ComfyUI Node

Atlas SAM3 Mask πŸͺ„

Atlas SAM3 Mask πŸͺ„ β€” open-vocabulary segmentation that runs on your Mac

By mikejamesvfxΒ·Created 3 months agoΒ·Updated a day agoΒ· 1
Atlas SAM3 Mask πŸͺ„
  • image
  • mask
  • report
β—„conceptsskyβ–Ί
β—„confidence_threshold0.50β–Ί
β—„deviceautoβ–Ί
β—„output_modemergedβ–Ί
β—„max_instances0β–Ί
β—„concepts_extraβ€”β–Ί

AtlasSAM3Mask is the pack's open-vocabulary segmenter: you give it concepts like "sky" or "person, vehicle" in plain words and it returns a mask of every detected instance, unioned across all your concepts. The interesting part isn't the concept masking itself - that's the modern SAM move - it's how it's implemented. This node loads SAM3 straight through transformers (Sam3Model/Sam3Processor), with no triton and no comfyui-rmbg dependency, which means it actually works on Mac (MPS), CPU, and AMD - the platforms where the popular third-party SAM3Segment node cannot load at all, because that one hard-requires triton.

The pack's own comment on it is blunt: Mac/CPU/AMD users could never load real SAM3 before this, and always fell back to the SegFormer AtlasSemanticMask. So for anyone not on a triton-capable Nvidia stack, this node isn't a nice-to-have - it's the difference between open-vocabulary masking and a fixed ADE20K vocabulary.

Inputs that matter

  • image and concepts - comma-separated open-vocabulary concepts. The mask is the union of every detected instance across every concept.
  • confidence_threshold - default 0.5, per-detection cutoff.
  • device - auto/cuda/mps/cpu. MPS is best-effort: if a specific op isn't supported yet, the node falls back to CPU automatically.
  • output_mode - merged (one union mask, the default - what every sky/scope consumer wants) or separate (an NΓ—HΓ—W stack, one instance per slice, ordered largest first - feed AtlasInstanceMask to pick one).
  • max_instances - separate mode only: keep at most N instances, largest first.
  • concepts_extra - additional concepts unioned in, so you can wire a second sam_prompt output from elsewhere.

Outputs: mask and a report describing what it found.

Install - the one real requirement

This needs the [sam3] extra, and SAM3 itself is gated on Hugging Face:

cd <ComfyUI>/custom_nodes
git clone https://github.com/mikejamesvfx/atlas-camera.git
# then, into ComfyUI's Python:
pip install "transformers>=5.5.4,<6"
# one-time HF auth for the gated facebook/sam3 weights:
hf auth login

That hf auth login (or an HF_TOKEN env var) is the step everyone trips on. SAM3's weights are behind Meta's SAM-License-1.0 on Hugging Face: you request access at huggingface.co/facebook/sam3, wait for approval, then authenticate. Without it you get a gated-model error on first run, and the fix is the token, not a reinstall. And note the transformer version matters - AtlasSemanticMask works on older transformers, but this node needs β‰₯5.5.4.

Where it fits

In the Atlas cascade this is the preferred sky/scope mask source, replacing AtlasSemanticMask as the default when [sam3] is installed. Use it for anything the fixed ADE20K vocabulary can't express, and feed its masks into AtlasScopeMask, the sky dome, or any exclusion logic. It lives in Atlas/04 Β· Masks (the whole pack installs via ComfyUI Manager by searching "atlas-camera").

CategoryAtlas/04 Β· Masks

Inputs (7)

NameTypeDefaultDescription
imageIMAGEβ€”
conceptsSTRINGskyComma-separated open-vocabulary concepts (e.g. 'sky', 'person, vehicle'). The mask is the UNION of all detected instances across every concept.
confidence_thresholdoptFLOAT0.500–1β€”
deviceoptCOMBOauto4 options: auto, cuda, mps, cpu
output_modeoptCOMBOmergedmerged = one union mask (the default, and what every sky/scope consumer wants). separate = an (N,H,W) stack, one instance per slice, ordered LARGEST FIRST β€” feed AtlasInstanceMask to pick one.
max_instancesoptINT00–128separate mode only: keep at most N instances (largest first). 0 = unlimited. Ignored when merged.
concepts_extraoptSTRINGAdditional comma-separated concepts, unioned with `concepts`. Wire a second sam_prompt output here.

Outputs (2)

NameTypeDescription
maskMASKβ€”
reportSTRINGβ€”