SAM-Audio Model Loader
The SAM-Audio loader that fights Hugging Face's gate for you
- pipeline
Every node in the ComfyUI-SAM-Audio pack hangs off this one. "Model Loader" is the least exciting name on the board, but it does the job nobody wants to do manually: it drags Meta's SAM-Audio checkpoint onto your disk, and when Hugging Face tells you the official repo is gated, it quietly falls back to a checksum-verified mirror of the same weights. You queue a workflow, it downloads, you never think about it again.
If you're new to SAM-Audio: it's Meta's foundation model for isolating a single sound out of a mixture - describe it ("man speaking"), point at it in time (spans), or point at it on screen (a mask). It got a big launch moment in December 2025 and then the usual thing happened: the model was great, the weights were gated behind Meta's form, and ComfyUI needed a wrapper that made it just work. This loader is that wrapper.
How it works
The loader offers six checkpoints, three sizes times two flavors:
sam-audio-small,-base,-large- text and span separation- the
-tvvariants - the text-visual models, the ones you want for the Visual and Video separators
"Tv" stands for text-visual: same size as its plain sibling, but with the encoder needed to understand a mask. The small checkpoint is about 5 GB, base about 7.7 GB, large about 15 GB. Sizes like that are why the default model is large - and why you might switch it to base your first time out, because the download is the slow part of your first run, not the separation.
On first queue the loader tries Meta's official repos, and if access is denied it pulls the matching pinned mirror from the mrfakename SAM-Audio collection, verifying the SHA-256 before it will load a thing. The required T5 text encoder is a separate pinned snapshot in your Hugging Face cache. Local model folders you drop into models/sam_audio/ show up automatically as long as they contain config.json and checkpoint.pt.
The only other input is attention_backend. Leave it on pytorch (SDPA) unless you know why you want comfy_kitchen's quantized INT8 kernel - it needs a recent ComfyUI build and a GPU, and it slightly changes results because the attention is quantized. It's a speed lever, not a default.
Installing it
ComfyUI Manager: search "ComfyUI-SAM-Audio" and install. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/ethanfel/ComfyUI-SAM-Audio.git
python ComfyUI-SAM-Audio/install.py # same Python env as ComfyUI
Then restart. The install.py step matters and isn't optional decoration: it installs the upstream Meta packages with --no-deps so their training stack (including a compiled xFormers wheel) can't clobber ComfyUI's torch. Audio packs live at the edge of the ecosystem and dependency conflict is their default failure mode; this one ships its own installer specifically to avoid it.
Common issues
- First queue looks hung. It's downloading gigabytes. Watch the console, not the progress bar.
- Python below 3.11 fails at install time. Update your venv.
- It uses VRAM and then won't let go. ComfyUI's Unload Models moves it off the GPU but keeps the cached model in system RAM; use Unload Models and Execution Cache when you want it fully gone.
- License. The integration is MIT, but the checkpoints carry Meta's separate SAM License - both the official and the mirrored files. Read it before you ship anything.
The pipeline output is a SAM_AUDIO_PIPELINE, and every separator in the pack has a socket shaped exactly like it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | facebook/sam-audio-large | Models download into models/sam_audio; valid local model folders appear automatically. |
| attention_backend | COMBO | pytorch | PyTorch SDPA is the accurate default. Comfy Kitchen uses its quantized INT8 attention kernel when supported. |
| precisionopt | COMBO | auto | Auto uses BF16 on supported GPUs and FP32 otherwise. BF16 roughly halves model memory and is usually faster. |
| initial_deviceopt | COMBO | cpu | GPU assigns checkpoint tensors directly to the GPU during loading. CPU gives ComfyUI its normal offloadable starting state. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipeline | SAM_AUDIO_PIPELINE | — |