Nodes/ComfyUI_AceNodes/πŸ… Audio Crop
ComfyUI Node

πŸ… Audio Crop

Cut a clip out of any audio with a human-readable time range

By hay86Β·Created 2 years agoΒ·Updated about a year agoΒ· 96
πŸ… Audio Crop
  • audio
  • AUDIO
β—„start_time0:00.000β–Ί
β—„end_time1:00.000β–Ί

If you generate audio in ComfyUI - TTS, music, video soundtracks - you will eventually want to cut a clip out of the middle. ACE_AudioCrop is a slice tool for audio, and its one genuinely nice idea is that the time range is written the way a human writes it: 0:00.000 to 1:00.000, not sample indices. No math, no "how many frames is 3.2 seconds at 44.1kHz," just a start and an end in minutes:seconds.

It's part of πŸ… Ace Nodes (hay86/ComfyUI_AceNodes), the usual one-author grab-bag. Small, local, dependency-free at runtime.

How it works

The node expects a standard ComfyUI audio dictionary - {"waveform": tensor, "sample_rate": int} - the same shape VideoHelperSuite and other audio-capable packs use. It parses your time strings into seconds, converts them to sample indices using the audio's sample rate, and slices the waveform. Inputs:

  • start_time / end_time - strings like 1:30.500. The format is minutes:seconds.milliseconds; a plain 30.5 also works and is treated as seconds. Default range is 0:00.000 to 1:00.000, so set both or you'll get the first second for free and wonder why.
  • audio - the audio dict.

Output is AUDIO - another {"waveform", "sample_rate"} dict - so you can chain it into another audio node, a save, or a video muxer. Out-of-range values get clamped to the clip's length, and start >= end raises a clear error rather than silently returning garbage.

The trap that catches people

This pack's own ACE_AudioLoad does not produce the dict format this node wants. ACE_AudioLoad returns raw samples plus a separate sample-rate integer, which is what ACE_AudioSave and ACE_AudioPlay expect. ACE_AudioCrop wants the combined dict. So the natural wire - Load β†’ Crop β†’ Save - actually doesn't type-match, and you'll need an intermediate step (or another audio source that emits the standard dict) to connect them. It's an internal inconsistency in the pack, not something you did wrong.

Installing

ComfyUI Manager β†’ search ComfyUI_AceNodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/hay86/ComfyUI_AceNodes

Then restart. Installing pulls the pack's heavy requirements.txt (transformers, rembg, insightface, soundfile, …), but the crop node itself is pure Python + torch.

Where you'll actually use it: trimming dead air off a TTS clip before saving, pulling a punchline out of a longer generation, or cutting a specific section to feed back into a video soundtrack. If your audio chain already uses VideoHelperSuite, its own audio handling may cover this - but for a plain "cut from X to Y" with a readable time field, this one is hard to argue with.

CategoryAce Nodes

Inputs (3)

NameTypeDefaultDescription
audio*β€”
start_timeSTRING0:00.000β€”
end_timeSTRING1:00.000β€”

Outputs (1)

NameTypeDescription
AUDIOAUDIOβ€”