Audio Cut (mtb)
Trim an audio clip by milliseconds in ComfyUI
- audio
- cut_audio
Sometimes you just need the first three seconds of a clip, or a chunk from the middle. Audio Cut (mtb) is the basic trimmer for that - give it audio, tell it where to start and how long to keep, and it returns just that slice. Everything's measured in milliseconds, which is the one thing to remember before you wonder why "1000" gave you a one-second cut.
It's more useful than it looks once you're doing audio-driven video. Lip-sync, talking-head, and audio-reactive workflows care a lot about how long the audio is, because clip length often drives frame count. If your voice clip is ten seconds but you only want to animate two, you cut it here first. It's also handy for grabbing a specific phrase out of a longer recording, or trimming dead air off the front.
It sits in the audio section of MTB Nodes (comfy_mtb) by melMass, next to the pack's other small audio helpers.
How it works
It works on the AUDIO tensor ComfyUI passes around, keeping the samples between your start offset and start-plus-length and dropping the rest. Because it's operating on the raw waveform there's no re-encoding and no quality loss - it's a straight slice. Values are in milliseconds, so the node converts your ms into sample positions using the clip's sample rate internally.
The inputs and outputs that matter
Three inputs, and two of them are the whole job:
audio- the clip to trim.offset(default 0, in ms) - where the cut starts. 0 starts at the beginning; 2000 skips the first two seconds.length(default 1000, in ms) - how much to keep from the offset. 1000 keeps one second; 5000 keeps five.
Output is cut_audio (AUDIO) - the trimmed slice, ready to feed into a save-audio node or an audio-driven video workflow.
So "give me two seconds starting at the five-second mark" is offset 5000, length 2000. Straightforward once the milliseconds click.
How to install it
ComfyUI Manager: search MTB Nodes, install, restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/melMass/comfy_mtb
then restart. It leans on torchaudio, which normally comes with your PyTorch install, so there's usually nothing extra to fetch and no model to download.
Common issues & troubleshooting
You expected seconds, you got milliseconds. The single most common surprise. length 5 is five milliseconds - effectively silence. For five seconds, use 5000. Everything on this node is ms.
The cut is shorter than requested. If offset + length runs past the end of the clip, you only get what's actually there. Check the source duration; you can't cut more than exists.
Empty or near-silent output. Usually an offset that's already past the end of the clip, or a length of just a few ms. Verify both numbers against the clip's real length in milliseconds.
Downstream length mismatch. If a video node expected a certain number of frames derived from audio length, trimming the audio changes that. Cut the audio to the length you actually want before the node that computes frame count, not after.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | AUDIO | — | |
| length | FLOAT | 10000–999999 | — |
| offset | FLOAT | 00–999999 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cut_audio | AUDIO | — |