Load & Trim Audio
Cut clips on the node, not in a calculator
- audio
- duration
If you've ever loaded audio into ComfyUI just to trim five seconds off the front, you know the drill: open an external editor, cut, export, re-import. Load & Trim Audio kills that whole detour. It's an audio loader with a full interactive waveform drawn right on the node - click to place a playhead, drag the shaded region to select, hit play to preview - and it hands you back the sample-accurate trimmed AUDIO plus its duration. No ffmpeg one-liner, no typing sample numbers.
It's one node in Enigmatic Nodes, a small utility pack by the individual developer enigmatice. Pure Python plus a bit of JS; no models, no API keys, nothing to download. The kind of node that's easy to overlook until you've wired audio into a video pipeline and realized half the work is just "get the clip to start where I want."
How it works
The backend is deliberately boring, and that's a compliment. It decodes your file through ComfyUI core's own PyAV-based audio loader (comfy_extras.nodes_audio) and trims by sample count, so the cut is exact rather than approximate. One genuinely thoughtful detail: the code explicitly avoids torchaudio.load because on torchaudio 2.9+ that routes through the optional torchcodec backend, which isn't installed in many portable builds and just raises ImportError. The author worked around a real footgun instead of shipping it.
The fun lives in the frontend. web/audio_trim.js draws the waveform on the node: click to drop the playhead, press I/O to set in/out points there, drag the shaded region's edges to trim by hand, drag the middle to slide the whole selection. ← / → nudge the playhead, Shift makes the step bigger, Space (or Play) previews just the trimmed range, and double-click resets to the full clip. Once you've felt how fast that is compared to typing start_time: 1.437, the old way feels like filing paperwork.
The inputs that matter
- audio - a dropdown of files in ComfyUI's
inputfolder, with an Upload button on the node (or drag a file straight onto it). It also accepts video files and pulls the audio track, which is handy when your source is a clip. - start_time / end_time - seconds into the clip.
end_timeof0(or anything past the end) means "play to the end", which is why the default does the right thing the moment you add the node.
The outputs
- audio - a ComfyUI
AUDIOobject (waveform tensor plus sample rate), ready to feed audio nodes or audio-driven video workflows. - duration - the trimmed length in seconds as a
FLOAT, useful for wiring into other math or metadata downstream.
Installing it
This is the same for every node in the pack:
- ComfyUI Manager - search Enigmatic Nodes, install, restart.
- Manual -
cd ComfyUI/custom_nodes && git clone https://github.com/enigmatice/comfyui-enigmatic-nodes, then restart.
No model files to fetch. The pack's pyproject.toml declares torch, numpy, scipy, Pillow, and opencv-python. ComfyUI core already ships all of those except opencv-python - and you'll almost certainly have that already, since it's one of the most common transitive dependencies across ComfyUI node packs. Manager installs dependencies for you; if you cloned by hand and something complains, pip install opencv-python covers it.
Common issues
- Your file isn't in the dropdown. It has to live in
ComfyUI/inputor be uploaded through the node's button. Drop files elsewhere and they won't appear. end_timeseems to do nothing. Remember0means "to the end", so don't use it hoping for an empty clip.- The waveform looks empty. The node draws it from the loaded file, so check you picked something with an actual audio stream.
It's a young pack - this node shipped mid-2026, with zero community footprint so far - so don't expect a stack of tutorials around it. But for the narrow job of "trim audio without leaving the graph," it does the thing exactly the way you'd want it done.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | COMBO | Pick an audio/video file from ComfyUI's input folder, or use the Upload button on the waveform. | |
| start_time | FLOAT | 0.0000–86400 | Trim start in seconds. Drag the left handle on the waveform to set this. |
| end_time | FLOAT | 0.0000–86400 | Trim end in seconds. 0 (or past the clip length) means play to the end. Drag the right handle on the waveform to set this. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| duration | FLOAT | — |