Nodes/Comfy-MSS/Load Audio
ComfyUI Node

Load Audio

The loader that also tells you which file you loaded

By pymss-project·Created 4 months ago·Updated a day ago· 22
Load Audio
    • audio
    • audio_name
    audio
    input_name

    Why bother when core has a Load Audio

    Because ComfyUI's built-in audio loader hands you a waveform and nothing else. pymss_load_audio hands you a waveform and the name of the file, which sounds like trivia until you're saving stems. Save Audio in this pack takes its filename as a forced input socket - you have to wire a string into it. Without a name source, every run writes audio_20260923_141233.wav and you've got a folder of timestamps.

    With this node you get audio_name (the file name with the extension stripped), wire it through a concatenate node next to the stem name coming off a separator, and your output folder reads like a session: mysong_vocals.wav, mysong_instrumental.wav, mysong_other.wav.

    Inputs and outputs

    • audio - a combo listing the files in ComfyUI's input directory, filtered to audio and video content types. Video is in there deliberately: an .mp4 with an audio track shows up in the menu and its audio gets decoded, which is the shortcut for pulling stems out of a clip you generated.
    • input_name - an optional string you almost certainly won't see. The frontend hides the widget; the author's own comment explains it's metadata for external hosts (pymss's DAG runner, pymss-studio): if the file isn't present at run time, the runtime input mapped to this name supplies it instead. Inside ComfyUI it does nothing.
    • Output audio - the standard ComfyUI AUDIO dict, waveform shaped [1, channels, samples].
    • Output audio_name - the filename without extension, run through a sanitiser that replaces characters illegal in filenames (<>:"/\|?*, control characters) with underscores and strips trailing dots.

    An Upload Audio button is added to the node by the pack's frontend, mirroring the official loader. It posts to the pack's own upload endpoint, which writes into ComfyUI's input folder with a (1), (2) suffix instead of overwriting. That endpoint is deliberately local-only and returns 403 to anything that isn't localhost - so if you're driving ComfyUI from another machine on your network, upload from the ComfyUI host instead.

    How it works

    Decoding is delegated to ComfyUI's own loader (comfy_extras.nodes_audio.load), which means one system's worth of codecs - PyAV - is doing the work, and this node inherits whatever formats your ComfyUI can already read. The pack's contribution is everything around it: the name output, the upload button, the sanitising.

    One consequence worth knowing: the file list is built when the node's input schema is built, so a file you copy into input/ while ComfyUI is running appears after a browser refresh, not instantly.

    Install

    Part of Comfy-MSS:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pymss-project/comfy-mss
    python -m pip install pymss   # into ComfyUI's Python env
    

    Or install Comfy-MSS from ComfyUI Manager and restart. This node itself needs no model weights - but it's usually the first node in a graph that does, so the pack's Python dependency (pymss, which drags in torch, av, librosa and friends) still has to be there.

    Where it bites

    • Empty combo. Put the file in ComfyUI/input/ and hit refresh in the canvas menu. That directory is also where the Upload button writes.
    • audio_name is sanitised. A file called my song: take 2.wav becomes my song_ take 2. Fine for filenames; don't compare it against the original as a string.
    • Batches. This loader produces a single item. If something downstream multiplies it, remember that pymss's separators accept exactly one audio item per run and will tell you to split batches.
    • v1.0.x workflows. Node types were renamed in v1.1.0; older saved graphs load broken and need rebuilding.
    Categoryaudio/pymss

    Inputs (2)

    NameTypeDefaultDescription
    audioCOMBO0 options:
    input_nameoptSTRING

    Outputs (2)

    NameTypeDescription
    audioAUDIO
    audio_nameSTRING