Load Audio
Load an audio track with a start time and a duration cap
- audio
- duration
If you're building a video-generation workflow that needs an audio track, the stock ComfyUI LoadAudio node gets you most of the way - but it can't trim. Load Audio is Eclipse's drop-in replacement that adds two controls the built-in node lacks: start_time and duration, both in seconds. Need just the second half of a soundtrack for a video clip? Set start_time to 4 and duration to 6, and out comes exactly 6 seconds of audio. It's modeled on the same behavior the VHS pack's audio loader is known for, which tells you the gap it's filling: video pipelines almost never want the whole file.
How it works
The node reads from ComfyUI's input/ folder - drop an audio or video file in there and it appears in the audio dropdown (it accepts video files too, taking the audio stream from them). Internally it uses PyAV to decode, and it seeks before decoding rather than decoding the whole file and then slicing. That matters: trimming a long file is efficient instead of reading everything up to your start point. The _load_trimmed helper opens the file, seeks to the keyframe at or before your offset, decodes until it hits the duration cap, and returns float32 PCM waveform plus sample rate. Outputs are audio (the AUDIO tensor) and duration (the loaded length in seconds as a float) - handy if a downstream loop or trim node needs to know how long the clip actually is.
The two timing inputs are the whole show:
start_time- offset in seconds from the file's beginning.0= start at the top.duration- maximum length in seconds to load.0= load to the end of the file.
Both clamp at 0, so there's no negative-offset footgun.
The dependency gotcha
Here's the thing the README doesn't tell you: PyAV is not in the pack's requirements.txt, but the node imports it unconditionally. The source comment claims PyAV is "already an Eclipse dependency" - it isn't, at least not in the declared dependencies (torch, numpy, Pillow, opencv-python, pilgram, safetensors, torchvision, PyYAML, aiohttp). If the node fails to load or errors with No module named 'av', that's why. The fix:
pip install av
into the same Python environment that runs ComfyUI (portable installs: python_embeded\python.exe -m pip install av). Many ComfyUI environments end up with PyAV installed anyway because another pack pulled it in - but don't count on it.
Install
The node ships with the ComfyUI_Eclipse pack:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI_Eclipse
Or install ComfyUI_Eclipse via ComfyUI Manager and restart, then confirm av is present as above. Realistic use: feed the audio output into a video generation or audio-conditioning node, and pipe duration into a loop or trim calculator so your video length and audio length actually agree. That pairing - exact-length audio for exact-length video - is the reason the duration output exists.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| audio | COMBO | Audio (or video) file from ComfyUI's input folder. Drop files into input/ to make them appear here. | |
| start_time | FLOAT | 0.000β86400 | Offset from the start of the file (seconds). 0 = beginning. |
| duration | FLOAT | 0.000β86400 | Maximum duration to load (seconds). 0 = load to end of file. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | β |
| duration | FLOAT | β |