VRGDG_LoadAudioFilePath
Always point at the audio you most recently dropped in
- audio_file_path
- audio_file_name
This is the "whatever's newest" pattern applied to audio. VRGDG_LoadAudioFilePath returns the path and filename of the most recently added audio file in the pack's audio input area - so a workflow can point at the track you just dropped in without you editing a hardcoded path on every run.
The music-video workflow is built around swapping in a new song and rerunning. If the workflow hardcoded my_song.mp3, every new track meant editing a string deep inside a graph. An auto-loader kills that step: drop the file, nudge the node, run.
What it does
One input:
- refresh (
INT, default 0) - bump it to force a rescan of the audio folder.
Two outputs:
- audio_file_path (
STRING) - full path to the newest audio file. - audio_file_name (
STRING) - just the filename.
That's it. Wire audio_file_path into something that consumes a path - a VRGDG_LoadAudioSplitDynamic node takes a path string, for instance, so this loader feeds it directly. (Note the sibling VRGDG_LoadAudioWithPath, which goes a step further and returns the actual loaded AUDIO as well as the path - if you need the decoded audio, reach for that one instead.)
Why "newest" is the right default
Iteration is the whole game. You load a track, the pipeline transcribes it, generates scenes, renders video. Then you load the next track. Without the auto-loader, each new song means remembering to update a path. With it, the workflow always does the sensible thing - grab the newest file - and you only ever touch the graph when you want to do something non-default.
One real-world note: community users have hit edge cases at the start of tracks - no-lyric intros caused trouble in at least one published workflow run. The audio loader isn't the fix for that (that's a transcription/scene-boundary issue), but it's the node that makes re-running with a trimmed track painless.
Installing it
It ships inside the comfyui-vrgamedevgirl pack. ComfyUI Manager: search "vrgamedev", install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl
then install the README's requirements (kornia, librosa, imageio) into your ComfyUI Python environment:
pip install -r custom_nodes/comfyui-vrgamedevgirl/requirements.txt
If it's not working
If it returns an empty or stale path, there's no audio in the expected folder yet, or a file you touched recently is beating your actual new track on "last modified." The node picks the newest by modification time - so if you edited an old file (even just tagging it), it'll win. Drop the track in fresh, bump refresh, and re-check. If it still points at the wrong thing, confirm which folder the pack scans - the workflow you're using determines whether it's watching an input directory or the pack's own scratch area.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| refresh | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| audio_file_path | STRING | — |
| audio_file_name | STRING | — |