Load Audio (Advanced)
It opens the mp4 and hands you the audio
- audio
- info
The stock Load Audio node takes a .wav and gives you an AUDIO. That's it, and that's the whole problem: the minute your sound lives inside an mp4, a screen recording, or a two-hour podcast, you're opening an editor just to export a WAV so ComfyUI will accept it. This node skips that step. Point it at the video, it pulls the track out. It also does the one thing the core loader has never done - let you take a slice instead of the whole file.
Why you'd reach for it
Audio in ComfyUI is a bolt-on layer. It arrived after the image stack was already settled, so the audio-capable packs tend to be their own little fiefdoms with their own loaders, and the boundary between "a file on disk" and "something a node can chew on" is where most workflows stall. This pack sits squarely on that boundary: one node gets audio in, one node writes it out, and the format conversion in the middle is a wire between them.
The reach-for-it cases are concrete. You generated a track with ACE-Step and want it as an MP3 a distributor will accept. You made a TTS voiceover that a lip-sync node needs to drive. You have a foley pass to eyeball, or a song where you only want the first 30 seconds because the full file blows out your context. Same job every time: get a real file into the graph as the AUDIO structure everything else expects.
What it actually does
PyAV (the av package, which ships with ComfyUI core) decodes the stream you pick into a float32 tensor normalized to [-1, 1] and hands back ComfyUI's usual {"waveform": (1, channels, samples), "sample_rate": ...} dictionary. If PyAV chokes on the container, it falls back to shelling out to ffmpeg, extracting a temporary WAV, and decoding that - so an oddball codec is a slower load, not a failed one.
The part worth knowing: it hangs a dictionary of probed source parameters (format, bit depth, bitrate, whether the source is lossless) onto the AUDIO object itself. That's invisible to you, but it's exactly what lets the save node later decide "this is already a 44.1k/16-bit stereo WAV, don't re-encode it, just copy it." Load with some other node and you lose the shortcut.
The inputs that matter
Seven fields, but only three you'll think about.
音频文件 is a dropdown of ComfyUI's input directory - and it lists video files too, which is the whole point. There's an upload button on the node, or you can drag a file onto the canvas and ComfyUI copies it in. 音轨序号 picks the audio track on multi-track files, 0 being the first. 截断方式 is the interesting one, with four options: no truncation, head segment only (0s → 截取时长(秒), default 60), middle range (起点(秒) → 终点(秒)), and start-to-end (起点(秒) only). The other fields are ignored depending on which mode you picked, which is stated in the tooltip and worth reading once.
报告语言 just chooses English, Chinese, or "follow the UI" for the text the node prints.
Outputs are audio (an AUDIO - wire it into any audio input, most usefully Save Audio (Platform Export)) and info (a STRING holding that same printed report: path, sample rate, bit depth, duration before and after truncation). info is a STRING, so you can pipe it into a text node if you're keeping notes, or just ignore it and read the panel.
One trap hiding in the mechanism: truncation happens after decode. The node decodes the entire file, then slices the tensor. So cutting 30 seconds off a two-hour podcast still costs you a full decode - what you save is downstream memory and sampler context, not load time.
Installing it
Via ComfyUI Manager, search comfyui_media_toolbox and install Media Toolbox. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jesse890423/comfyui_media_toolbox.git
Restart, then look under the Audio category.
Dependencies are almost nothing, and that's deliberate. av, numpy and torch come with ComfyUI. The pack's requirements.txt adds exactly one thing - imageio-ffmpeg - which bundles a static ffmpeg binary for the transcode path. ffmpeg itself is not in the Windows portable build. Check it's resolved:
python_embeded\python.exe -c "import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())"
If that errors, install it into the ComfyUI Python, not your system one. Loading will still work without ffmpeg because PyAV does the decode; it's the save side that needs the binary.
When it doesn't work
The dropdown says "(no audio or video files in the input directory)". Nothing's in input, or ComfyUI scanned before you added something. New files need the Refresh button on the node - ComfyUI only lists the directory at startup.
"This file contains no audio stream." You picked a silent video. There's genuinely nothing to extract; go back to the video tool that made it.
You asked for track 3 of a one-track file. The node falls back to track 0 silently rather than complaining. Always glance at the info output, which names how many tracks it found and which one it used.
"File not found" right after you deleted or renamed something just means the old filename is still baked into the workflow. Pick again from the dropdown.
And the pack only reads and writes inside ComfyUI's input and output directories - deliberate policy, not oversight. .. and absolute paths are rejected, so dropping files onto the canvas is the intended way in.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| 音频文件 | COMBO | Pick a file from the ComfyUI `input` directory, or use the upload button to bring in a file from anywhere on this machine. Video files are listed too, so their audio track can be extracted. The audio is previewed as soon as you pick it, without running the node. | |
| 音轨序号 | INT | 00–32 | Which audio track to use for files with multiple tracks (e.g. videos). 0 means the first track. |
| 截断方式 | COMBO | No truncation (use the whole file) | How to cut a long audio file: ① Head segment only: from 0 s, take Duration to take seconds ② Middle range only: from Start to End ③ From start to the end: use everything from Start to the end of the file For ① fill in Duration to take; for ② fill in Start and End; for ③ fill in Start only. |
| 起点(秒) | FLOAT | 0.000–1000000 | Where to start (seconds). Middle range: used together with End. From start to the end: the starting position; End is ignored. |
| 终点(秒) | FLOAT | 0.000–1000000 | Where to stop (seconds). Must be greater than Start. Only applies to the Middle range mode; ignored in other modes. |
| 截取时长(秒) | FLOAT | 60.000–1000000 | How much to take (seconds), measured from the beginning of the file, so the start is fixed at 0 s. Only applies to the Head segment mode; ignored in other modes. |
| 报告语言 | COMBO | Follow UI language | Language of this node's report text. "Follow UI language" produces a Chinese report while the ComfyUI interface is Chinese, and an English report otherwise. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio | AUDIO | — |
| info | STRING | — |