Nodes/ComfyUI Cut Audio/手动裁剪音频
ComfyUI Node

手动裁剪音频

AudioManualCut_CutAudio slices audio by mm:ss

By mailzwj·Created 4 months ago·Updated 4 months ago· 0
手动裁剪音频
  • audio
  • 音频
start_time00:00
end_time00:05

Sometimes you know exactly where the good part is. You've got a voice-over with three dead seconds at the front, or a music clip where the loop starts at 0:12, or a narration that runs ten seconds past where the video ends. You don't need an algorithm - you need a pair of scissors with the numbers already typed in. AudioManualCut_CutAudio is exactly that: give it a start and end time in mm:ss, get back the slice.

It's one of four nodes in the small ComfyUI-cut-audio pack (mailzwj, Apache-2.0), sitting under audio/cut-audio in the menu. Where its sibling AudioSplitBySilence_CutAudio guesses cut points for you, this one does what you tell it. If you know your times, this is the one you reach for - and it's usually a two-node job: load audio, cut, save.

How it works

It parses your mm:ss strings, converts both to sample offsets using the audio's sample rate, slices the waveform tensor between them, and returns the standard ComfyUI AUDIO dict (waveform + sample rate) that any downstream node can eat.

Two behaviors from the source are worth knowing because they shape how it feels to use:

  • End time past the end is fine. The cut clamps to the audio's actual length, so end_time of 99:00 on a 30-second clip just gives you the tail. The tooltip says it plainly: "超出音频时长则裁剪到末尾" - if it exceeds the audio length, cut to the end.
  • Start at or after the end is an error. The node raises rather than returning an empty clip. Which is the right call - an empty AUDIO would silently do nothing downstream instead of telling you the times are nonsense.

The inputs and outputs that matter

  • audio (AUDIO) - the clip to cut.
  • start_time (STRING, default "00:00") - where the slice starts, mm:ss.
  • end_time (STRING, default "00:05") - where it ends. Gets you a five-second default cut if you forget to change it, which is the one beginner surprise here.

Output is a single 音频 (AUDIO) socket. It feeds whatever comes next: a save/preview node, a video mux, or further processing like the pack's own segment workflow.

Format gotchas - read these before you type

The format is strict mm:ss, two parts, integer seconds 0–59. That means:

  • No hours. 01:30:00 throws a format error. For anything over an hour you'd have to do the math into minutes - which is silly but rare.
  • No decimal seconds. 00:00:00.5 is right out.
  • 1:30 and 01:30 both parse fine (the parser isn't picky about leading zeros), but mm:ss with zero padding is the safe habit.
  • The parser rejects seconds ≥ 60, so 00:75 fails with a message telling you seconds must be 0–59 rather than silently doing something weird.

If you're cutting to match a specific frame count, remember the times are in whole seconds - this is a manual trimmer, not a frame editor. For "cut the first ten seconds" it's perfect; for frame-exact edits you're in the wrong tool.

Installing it

Same story as the rest of the pack. In ComfyUI Manager, search ComfyUI-cut-audio and install, or:

cd ComfyUI/custom_nodes
git clone https://github.com/mailzwj/ComfyUI-cut-audio.git

Restart ComfyUI. The only dependency is torch (you already have it), and the pack needs a current ComfyUI because it's written against the newer comfy_api.latest node API - if the nodes don't show up, update ComfyUI. The README calls out that comfy_api is normally bundled. No models to download.

Where it bites

The classic mistake is leaving end_time at its "00:05" default and wondering why every clip you cut is exactly five seconds long. Change both fields. And pair it with AudioInfo_CutAudio from the same pack - that node tells you the real duration so you know your end time is even in range before you type it. One honest look at the numbers beats guessing, every time.

Categoryaudio/cut-audio

Inputs (3)

NameTypeDefaultDescription
audioAUDIO
start_timeSTRING00:00开始时间,格式 mm:ss(如 01:30 表示1分30秒)。
end_timeSTRING00:05结束时间,格式 mm:ss(如 02:00 表示2分钟)。超出音频时长则裁剪到末尾。

Outputs (1)

NameTypeDescription
音频AUDIO