LoadAudioReference
Filling the Audio Slot Your Video Pipeline Forgot
- references
- AUDIO
Audio used to be the afterthought in local video generation - generate silence, mux a track in afterward, call it a day. MiniMax H3 broke that: it generates picture and sound together as one unified context, which is why it's the open model people reached for when they wanted dialogue, room tone and SFX in the same pass. Once audio is part of the model's input as well as its output, an audio reference stops being decorative. It's a control.
LoadAudioReference is the smallest of the three loaders in this pack and the one I reach for least, but when a reference voice belongs to the prompt variant rather than the workflow, it's the difference between one graph and six copies of a graph.
What it actually does
Same plumbing as its image and video siblings: PromptDecodeV2 parses your TOML into a LOAD_REFERENCES object, this node pulls slot n out of the audio list, and hands back something a downstream node can use.
In the prompt file, that slot is filled like this:
[h3.refs]
voice = "<load type=audio key=voice>/home/you/refs/line01.wav</load>"
[h3.prompt]
_t = """<Audio voice> speaks the next line; <Picture hero> leaning on the balcony rail."""
The <Audio voice> tag resolves to <Audio 1>, matching slot 1 - the socket the H3 reference node calls ref_audio_0.
The decode step is where it earns trust: it calls comfy_extras.nodes_audio.load - ComfyUI's own audio-loading function, the one core's LoadAudio node uses - gets back a waveform tensor and a sample rate, adds a leading batch dimension, and packages them as {"waveform": ..., "sample_rate": ...}. That dict is ComfyUI's AUDIO type. Anything that accepts AUDIO from core's loader accepts this without complaint.
What it does not do: resample, trim, normalise, or downmix. Whatever the file is, that's what downstream gets.
Inputs and outputs that matter
- references -
LOAD_REFERENCES, fromPromptDecodeV2's seventh output, References. - n - INT, 1 to 10, default 1. Audio slot index; 1 is
<Audio 1>andref_audio_0.
One output: AUDIO, a batch of one, carrying the file's native sample rate.
Where it goes depends on what you're building. On the H3 side it's ref_audios.ref_audio_0 - a reference voice or music cue the model regenerates around. On the delivery side it's the audio input of CreateVideo, which is how the pack's own H3 sample workflow gets a soundtracked result: decoded images and audio into CreateVideo, video out to SaveVideo. Same node either way; the type is standard so it doesn't care.
Install
ComfyUI Manager, search comfyui-toml-prompt. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/morino-kumasan/comfyui-toml-prompt
Restart. requirements.txt is empty, so there is no pip step; the audio work rides on functionality ComfyUI already ships. Put your .toml in ComfyUI/custom_nodes/comfyui-toml-prompt/prompts/ - that's the folder PromptLoader reads. The README's install block is stale (wrong repo name, an SSH git@ URL that fails without keys), so use the https URL above.
Where people get burned
Silence where you expected a crash. If slot n is empty, the node returns None rather than raising. The failure then appears wherever the AUDIO should have gone, often as a message about the wrong node entirely. Usual causes: n outranks your slots, or the key containing the <load> wasn't selected in key_name_list - directives only execute for keys that get decoded. Slots are numbered by the order the parser meets each alias, so aliases beat mental arithmetic every time.
Sample rate surprises. No resampling happens here. Feed a 48 kHz file to something trained on 44.1 kHz or 16 kHz and you'll get either an error or a chipmunk, depending on how gracefully the consumer handles it. If a downstream node cares, put a resampler in between; this loader won't do it for you.
Format support is inherited, not added. It calls the same function core's audio loader calls, so if core can't open your .flac, .m4a or whatever else, this can't either. Convert to wav if you're chasing a decode error and nothing else is obvious.
A NameError on queue after a fresh install points at the pack wanting a ComfyUI recent enough for comfy_api.latest - the import failure is swallowed at startup, so the nodes appear healthy and then throw when run. Update ComfyUI before debugging anything else.
Absolute paths. The path goes straight to the file API with no join against your prompts folder. Relative paths are resolved against ComfyUI's working directory and will surprise you next session.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| references | LOAD_REFERENCES | — | |
| n | INT | 11–10 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| AUDIO | AUDIO | AUDIO. |