Image Audio CSV Generator
Pairing folders without a line of code
- csv_path
Honest first line: this node is not a video effect. It's a tiny file-utility that happens to ship inside the Simple Video Effects pack, and it exists to save you a genuinely annoying ten-minute scripting session. You give it a folder of images and a folder of audio files; it sorts both lists alphabetically, pairs them up with zip(), and writes a CSV where each row is one image_path;audio_path pair.
When would you reach for it? Building a training or conditioning dataset where each sample needs an image and a matching audio clip. Feeding an audio-driven generation pipeline that takes a manifest. Or just cataloging media - "give me a playlist file that links each still to its sound." Any time you'd otherwise open a text editor and hand-write a couple of hundred path;path lines.
How it works
The mechanism is deliberately boring, and that's a feature. It scans the image directory for .png, .jpg, .jpeg, .bmp, .gif, .tiff, .tif and .webp files, scans the audio directory for .mp3, .wav, .ogg, .flac, .aac, .m4a and .wma, sorts both lists ascending, then zips them. Pairing stops when the shorter list runs out. The CSV is written UTF-8 with a semicolon (;) delimiter, and the output directory is created automatically if it doesn't exist.
That zip() behavior is the one thing to internalize: mismatched counts silently truncate. If you have 40 images and 38 audio files, you get 38 rows and no warning about the two orphans. It's also pure alphabetical pairing - 10.jpg sorts before 2.jpg, so zero-padded names (0001, 0002…) are your friend if the order matters.
Inputs and output
All three inputs are plain paths:
image_directory_path- where the images liveaudio_directory_path- where the audio livesoutput_csv_path- where the CSV should go, e.g.C:/output/data.csvor/home/you/data.csv
The single output csv_path returns the full path to the file you just wrote. That's it - there's nothing to tune, no model, no knobs. If the two directories exist, it runs.
Installing it
Part of the Simple Video Effects pack:
cd ComfyUI/custom_nodes
git clone https://github.com/scofano/ComfyUI-Simple-video-effects
cd ComfyUI-Simple-video-effects
pip install -r requirements.txt
Restart ComfyUI, or install via ComfyUI Manager by searching "Simple Video Effects". No extra dependencies beyond what the pack already pulls in, and no model files.
Common issues
The usual suspects are path problems: a typo'd directory path (the node validates both folders exist before doing anything), or an output_csv_path pointing at a directory that turns out not to be a file path. Semicolon delimiters occasionally surprise people who open the CSV in Excel expecting commas - that's intentional, since image and audio paths on Windows often contain commas but rarely semicolons.
And remember the truncation thing: if the output has fewer rows than your image folder has files, that's the zip behavior, not a bug. Rename your files so both folders pair in the order you actually want.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image_directory_path | STRING | — | |
| audio_directory_path | STRING | — | |
| output_csv_path | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| csv_path | STRING | — |