Nodes/ComfyUI-aihub-workflow-exposer/AIHub Expose Project Audio
ComfyUI Node

AIHub Expose Project Audio

Pull a stored audio file out of the project — or just get the path

By otavanopisto·Created about a year ago·Updated 22 days ago· 7
AIHub Expose Project Audio
    • AUDIO
    • LOCAL_FILE
    idexposed_audio
    file_nameaudio.mp3
    batch_index
    do_not_processfalse
    optionalfalse

    AIHub Expose Project Audio reads an audio file stored in the AIHub project and hands it to your workflow as an AUDIO object, with the file path alongside. It's the audio member of the project-file expose family, aimed squarely at workflows that do something with sound - a music editor's project storing a track, an audio pipeline that generates or conditions on audio, that kind of thing.

    Like every project node, it depends on the AIHub project machinery: a workflow gets a project when its AIHubWorkflowController sets a project_type and the project's already been initialized, and the client manages where files live. When the client runs the workflow it tells the server which file this node means; the server injects the resolved path; the node decodes it. In the default (processing) mode it uses ComfyUI's own audio loader to produce the standard {"waveform", "sample_rate"} dict and returns it as AUDIO, plus LOCAL_FILE with the actual path.

    What you set

    • file_name - the audio file as stored, extension included (audio.mp3 default). The one you'll actually change.
    • batch_index - if the file is part of a batch, select one by index; a single integer, negatives count from the end.
    • do_not_process - check this and the node won't decode the audio: AUDIO comes back null and you get LOCAL_FILE to handle yourself. Useful when you want to hand the raw file to a node that takes a path, or you need a different loader than the default.
    • optional - true means a missing file returns nulls instead of aborting.
    • id - protocol field id.

    Outputs are AUDIO and LOCAL_FILE.

    When do_not_process is the right call

    The default decode is convenient, but it assumes you want ComfyUI's standard audio representation. If your downstream node expects a file path rather than a waveform dict - or if the file is in a format the default loader stumbles on - flip do_not_process and drive everything off LOCAL_FILE. It's the escape hatch, and knowing it exists saves you a "why is my audio null" debugging session. (Fun fact: that input's tooltip says "the video will not be processed," a copy-paste from the video node - it controls audio here.)

    Install & gotchas

    Standard pack install: ComfyUI Manager → search ComfyUI-aihub-workflow-exposer, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/otavanopisto/ComfyUI-aihub-workflow-exposer
    

    then restart. No requirements.txt, no model downloads - the pack uses only ComfyUI's bundled audio loading.

    The gotcha to remember is the project one: no project context means no files, and with optional off you'll get a hard "Audio file not found" error naming the file - helpful, but only if the file really is where the client says it is. If do_not_process is off and you get a null AUDIO, check that the file actually decodes with ComfyUI's loader before assuming the node is broken; some formats just don't load with it, and that's precisely when the flag exists.

    Categoryaihub/expose

    Inputs (5)

    NameTypeDefaultDescription
    idSTRINGexposed_audioA unique custom id for this workflow.
    file_nameSTRINGaudio.mp3The name of the audio file as stored in the project files, including extension
    batch_indexSTRINGIf the file belongs to a batch, the index of the latent to load, it must be a single integer, and it can be negative to count from the end
    do_not_processBOOLEANfalseIf set to true, the video will not be processed by the node and you will have to handle it manually
    optionalBOOLEANfalseIf set to true, it will not raise an error if the audio is not found

    Outputs (2)

    NameTypeDescription
    AUDIOAUDIO
    LOCAL_FILESTRING