Nodes/ComfyUI-SAM3/(down)Load SAM3 Model
ComfyUI Node

(down)Load SAM3 Model

Get Meta's SAM3 weights into your ComfyUI graph

By PozzettiAndrea·Created 9 months ago·Updated 27 days ago· 557
(down)Load SAM3 Model
    • sam3_model
    model_pathmodels/sam3/sam3.pt

    This is the node that puts Meta's SAM3 into memory so every other node in the pack can use it. Nothing in the SAM3 world segments anything until this has run - it loads the weights once and hands them downstream as a SAM3_MODEL, and the grounding, point, multiprompt and video nodes all take that connection as their first input. Think of it as the loader at the top of the graph, same role a checkpoint loader plays for a diffusion workflow.

    SAM3 (Segment Anything Model 3) is Meta's late-2025 segmentation model, and it's the current top of the masking heap. The whole point of SAM in a ComfyUI workflow was never background removal for its own sake - it's targeted selection: find one specific object, get a clean mask, then feed that mask into inpainting, regional prompting, or compositing. SAM3's upgrade over SAM 2 is open-vocabulary text prompts and solid video tracking, which is exactly what the rest of this pack is built to exploit. If you just want a subject cut off a background, honestly rembg or BiRefNet is less hassle. Reach for SAM3 when you need this cat, not that one.

    How it works

    It reads the SAM3 checkpoint off disk and returns it as a SAM3_MODEL handle. That's the entire job - no image goes through it, no mask comes out. The segmentation math happens in the downstream nodes; this one just makes the model available so you're not reloading multi-hundred-megabyte weights on every node. Load once, branch the output to as many segmentation nodes as you like.

    The inputs and outputs that matter

    There's really only one input:

    • model_path - a string, defaulting to models/sam3/sam3.pt. This is a plain text path, not a dropdown, so it does not scan your folder and it will not warn you if it's wrong. It's relative to your ComfyUI root, so the default expects ComfyUI/models/sam3/sam3.pt. Put the file there and you can leave this untouched.

    Output is sam3_model (SAM3_MODEL) - wire it into SAM3 Text Segmentation, SAM3 Point Segmentation, SAM3 Multiprompt Segmentation, or SAM3 Propagate. You can fan it out to several at once.

    How to install it

    The pack ships the loader alongside every other SAM3 node, so you're installing the pack, not the node. Three ways, per the author's README:

    1. ComfyUI Manager (recommended) - search SAM3 in the Manager and install the highest version shown. If that misbehaves, try the nightly.
    2. Manager → Install via Git URL - https://github.com/PozzettiAndrea/ComfyUI-SAM3.git.
    3. Manual (most reliable):
      cd ComfyUI/custom_nodes
      git clone https://github.com/PozzettiAndrea/ComfyUI-SAM3.git
      cd ComfyUI-SAM3
      pip install -r requirements.txt --upgrade
      python install.py
      
      then restart ComfyUI.

    Heads up on two things. The README warns that the pack can attempt an experimental one-click isolated install via comfy-env, which pulls in the pixi package manager - convenient when it works, one more moving part when it doesn't. And you need the weights themselves: sam3.pt goes in ComfyUI/models/sam3/. The install.py step is what fetches it; if you skip that, the folder stays empty and this node has nothing to load.

    Common issues & troubleshooting

    "File not found" / model won't load. The sam3.pt file isn't at models/sam3/. Either install.py didn't finish or it landed somewhere else. Confirm the file exists at the exact path in model_path. Because the input is a raw string, a stray typo or a wrong ComfyUI root just fails silently-ish - check the console.

    Install blew up with dependency or CUDA errors. This is the common failure across this author's packs - the experimental comfy-env/pixi path and a fresh install.py can trip over dependency conflicts or a CUDA mismatch. If the one-click route fails, fall back to the manual clone plus pip install -r requirements.txt --upgrade and python install.py inside your actual ComfyUI Python environment, which is the route the README itself calls the most reliable.

    Loaded but downstream nodes error. Remember this node produces no mask on its own - it's inert until a segmentation node consumes the SAM3_MODEL. If nothing's happening, you probably haven't wired the output anywhere yet.

    CategorySAM3

    Inputs (1)

    NameTypeDefaultDescription
    model_pathSTRINGmodels/sam3/sam3.ptPath to SAM3 model checkpoint (relative to ComfyUI root or absolute). Auto-downloads if not found.

    Outputs (1)

    NameTypeDescription
    sam3_modelSAM3_MODEL