Nodes/ComfyUI-Allen-Yinpin/Allen Load Audio (Yinpin)
ComfyUI Node

Allen Load Audio (Yinpin)

Allen Load Audio (Yinpin)

By mayunejie·Created 9 months ago·Updated 9 months ago· 0
Allen Load Audio (Yinpin)
    • audio
    • filename_text
    audio
    upload_name

    You already have a Load Audio node - ComfyUI ships one. So why is somebody publishing yet another audio loader? Because the built-in one hands you audio and nothing else: no idea what that audio is called. Allen Load Audio (Yinpin) is the entire ComfyUI-Allen-Yinpin pack, and its whole reason to exist is one extra output: a plain string with the source file's name.

    If you've ever tried to build an audio-reactive or lip-sync workflow where the result has to be traceable back to the input - save the video named after the track it reacted to, or dump per-file transcripts in a batch - you know the pain. ComfyUI's AUDIO type carries the waveform but the name is just gone once it hits the graph. This node is the two-line fix for that.

    How it works

    Under the hood it's a thin wrapper around torchaudio.load. At import time it registers "audio" as a folder type pointing at your input/ directory, so the node's dropdown lists every .wav, .mp3, .flac, .ogg and .m4a sitting there. It loads the file, wraps the waveform in the standard ComfyUI AUDIO dict (waveform with a batch dimension plus sample_rate), and computes the filename with the extension chopped off. Nothing exotic - the trick is just that second output.

    The upload button is where it gets slightly clever. The bundled JS adds an "Upload audio" widget that POSTs your file to ComfyUI's /upload/image endpoint (the same one other upload-capable nodes use) and stashes your original filename in a hidden upload_name widget. That matters because ComfyUI renames files server-side when you upload them. Without the stash, the filename output would be whatever mangled name the server generated; with it, you get the name you actually uploaded - which is the whole point.

    The inputs and outputs that matter

    Only two inputs, and neither is interesting. audio is a dropdown of files in input/ (pick one, or click Upload). upload_name is a hidden string the JS fills in; you never touch it by hand. The two outputs are the payload:

    • audio (AUDIO) - wire it into Save Audio, an audio preprocessor, or anything that expects an AUDIO tensor.
    • filename_text (STRING) - the base name without extension. Wire it into Save Audio's filename field or any downstream node that needs the name.

    Installing it

    ComfyUI Manager → "Install via Git URL" with https://github.com/mayunejie/ComfyUI-Allen-Yinpin, then restart. Or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/mayunejie/ComfyUI-Allen-Yinpin
    

    Restart ComfyUI and the node shows up under the Allen category. There's no requirements.txt - it needs torchaudio, which a normal ComfyUI install already bundles, so usually nothing extra to pip.

    Where people get burned

    The big one is silent failure. Read the source and you'll find a try/except around the decode that, on any error, returns one second of digital silence at 44.1 kHz instead of raising. An mp3 codec your torchaudio build can't decode, or a corrupt file, and you won't see an error - your pipeline just quietly runs on a second of zeros. If your output suddenly sounds like nothing, check this node before the sampler. Relatedly, if the node doesn't appear at startup with a No module named 'torchaudio' traceback, your environment is missing it: pip install torchaudio.

    Worth knowing the pack is a single-node side project from an individual developer - the code comments even reference RunningHub, the Chinese cloud platform it was evidently built against - and it has essentially zero community footprint, so install it by URL rather than expecting a Manager registry hit. The whole thing is about forty lines; skim it before you trust it in a batch job. There's nothing scary in there, and honestly not much that can go wrong.

    That's about it. If you never need to name a saved audio file after its input, skip this pack - core Load Audio does everything else. If you do, it's the cheapest fix you'll find.

    CategoryAllen

    Inputs (2)

    NameTypeDefaultDescription
    audioCOMBO0 options:
    upload_nameoptSTRING

    Outputs (2)

    NameTypeDescription
    audioAUDIO
    filename_textSTRING