Nodes/Meta SAM-Audio/SAM-Audio Span Separate
ComfyUI Node

SAM-Audio Span Separate

Text plus time, when a description isn't enough

By ethanfel·Created 23 days ago·Updated 8 days ago· 4
SAM-Audio Span Separate
  • pipeline
  • audio
  • spans
  • target
  • residual
descriptioncar honking
seed0
inference_steps32
chunk_duration10.0
chunk_overlap1.0
reranking_candidates1

This is the precision variant of the pack's text separator. Same model, same diffusion separation, same two audio outputs - but it takes a SAM_AUDIO_SPANS chain in alongside the description, so you can tell the model exactly where in the timeline the target lives. If the Text Separate node is your first attempt, this is the upgrade you reach for when the first attempt grabs the wrong sound.

How it works

Mechanically it's the text separator plus one more input. Your description ("car honking", "man speaking") conditions the separation, and the spans you built with SAM-Audio Span Prompt constrain when the model is allowed to find it. Positive spans are where the target is present; negative spans are where it isn't. The node validates your spans against the actual clip duration before it does anything, so a span that hangs past the end of the audio is clipped, not an error.

The rest of the inputs are shared with every separator in the pack, and they're the ones worth knowing:

  • seed - SAM-Audio starts from noise, so the seed controls reproducibility. Same seed, same audio, same description, same spans → same separation. Bump it when you want a different take.
  • inference_steps - 32 by default, 2–128. More steps is slower and usually cleaner; for a quick preview, 16 is a fine starting point.
  • chunk_duration / chunk_overlap - long audio is cut into overlapping chunks and stitched back with a normalized crossfade (10-second chunks, 1-second overlap by default). Set chunk_duration to 0 to process the whole clip in one pass - simpler, but that's how you OOM on a long file.

The two outputs, target and residual, are what every separator gives you: the isolated sound you asked for, and everything that was left over. Wire both into PreviewAudio or a save node - hearing the residual is genuinely useful, because if your target leaks into it, your spans are off.

When to use it over the text node

Use spans when your mixture is doing something structured: a podcast where a second guest talks over your target, a song where the instrument you want is silent in the middle, a field recording with a truck that rumbles through for a few seconds. Describing "car honking" gets you the honks everywhere; adding a positive span over just the section you care about stops the model from chasing the far-away one.

The reverse move - a negative span where the target isn't - is the one people underuse. If the model keeps separating a similar-sounding instrument that only appears in one section, a negative span there is your cleanest fix.

Common issues

  • Wrong chunk settings. For a clip under ~10 seconds the default chunking is moot. For anything longer, remember chunk_duration: 0 is your "whole clip, one pass" switch, and the 1-second overlap is the crossfade glue, not a detail to zero out.
  • Spans with a text-only model. If you picked a non--tv checkpoint you're fine - spans work on all variants, unlike visual prompting. The loader defaults to large, which handles all of it.
  • The download wall. First run downloads the checkpoint (5–15 GB depending on model) and the pinned T5 encoder. It's a one-time cost, and the node looks frozen while it happens - watch the console.

Install via ComfyUI Manager (search "ComfyUI-SAM-Audio") or the git clone + install.py route from the pack README.

Categoryaudio/SAM-Audio

Inputs (9)

NameTypeDefaultDescription
pipelineSAM_AUDIO_PIPELINE
audioAUDIO
descriptionSTRINGcar honking
spansSAM_AUDIO_SPANS
seedINT00–18446744073709550000Controls SAM-Audio's initial noise for reproducible separation.
inference_stepsINT322–128Number of midpoint function evaluations. Higher values are slower and may improve quality.
chunk_durationFLOAT10.00–3600Seconds processed per pass. Use 0 to process the entire clip at once.
chunk_overlapFLOAT1.00–60Seconds shared by adjacent chunks for a smooth crossfade.
reranking_candidatesoptINT11–8Generate multiple candidates and select one with Meta's Judge. Values above 1 lazily download and load the optional Judge model.

Outputs (2)

NameTypeDescription
targetAUDIO
residualAUDIO