ComfyUI Node

MiniMax Output Paths

Path prefixes so your FLAC, MP3, archive and cover all land in the same date folder

By jplenio·Created about 16 hours ago·Updated about 15 hours ago· 0
MiniMax Output Paths
    • original_prefix
    • sr_flac_prefix
    • sr_mp3_prefix
    • artwork_prefix
    source_name
    base_outputaudio_minimax3/%date:yyyy-MM-dd%/
    original_subdir32flac/
    sr_flac_subdir48flac/
    sr_mp3_subdir48mp3/
    artwork_subdirartwork/
    append_variant_indextrue
    variant_padding2
    run_index
    variant_count

    Batch music workflows fall apart in the filesystem. You render twenty tracks, and the FLACs land in one folder, the MP3s in another, the original archive somewhere else, and the cover art nowhere near either - and by the time you try to match "which MP3 pairs with which cover," you've invented a job that shouldn't exist. MiniMax Output Paths prevents that by computing consistent relative output prefixes for every file a song produces: original audio, release FLAC, release MP3, and artwork. One node, four prefix outputs, one shared base path.

    How it works

    You give it a source_name (the stable song identifier, normally the prompt filename or LLM source name) and a base_output - by default audio_minimax3/%date:yyyy-MM-dd%/, a relative path under ComfyUI's output directory where %date:yyyy-MM-dd% is expanded into a dated folder. Below that base, four subdirectory widgets split the outputs:

    • original_subdir (default 32flac/) - the untouched MiniMax source archive.
    • sr_flac_subdir (default 48flac/) - the final/upscaled lossless FLAC. The tooltip is worth reading: this is only a folder label; the actual sample rate comes from the audio signal entering the saver, not from the folder name.
    • sr_mp3_subdir (default 48mp3/) - final/preview MP3.
    • artwork_subdir (default artwork/) - cover JPGs.

    There's also a variant-handling block: append_variant_index (default true) appends a run number so multiple variants of the same song don't collide, with variant_padding (default 2, so _01 rather than _1). The optional run_index and variant_count inputs feed it and the metadata.

    Outputs

    original_prefix, sr_flac_prefix, sr_mp3_prefix, artwork_prefix - four STRING prefixes, each built from source_name + base + subdir (+ variant suffix). Wire them into the corresponding savers: the archive saver for the original, the FLAC and MP3 savers for the release formats, and the artwork saver for the cover. Because the same base filename flows through all four, the cover embed can always be matched back to its song.

    Installing it

    Pack install via ComfyUI Manager (search "MiniMax Music Production Toolkit") or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/jplenio/ComfyUI-MiniMax-Music-Production-Toolkit.git
    cd ComfyUI-MiniMax-Music-Production-Toolkit
    python -m pip install -r requirements.txt
    

    Dependencies: scipy, soundfile, imageio-ffmpeg, mutagen, Pillow. Restart ComfyUI and hard-refresh once.

    Gotchas

    Two naming traps. First, the folder names (32flac/, 48flac/, 48mp3/) are labels, not guarantees - the sample rate is whatever the audio actually is when it reaches the saver, so don't file a 44.1 kHz master under 48flac/ and assume anything resampled itself. Second, base_output is relative to ComfyUI's output directory; if you want absolute paths, that's what the separate Save Audio Absolute Path node is for. And if append_variant_index is off with multiple variants, you've signed up for filename collisions - the default exists for a reason.

    CategoryMiniMax Music Production Toolkit/batch

    Inputs (10)

    NameTypeDefaultDescription
    source_nameSTRINGStable source identifier used to derive output paths and provenance. It normally comes from the prompt filename or manual/LLM source name.
    base_outputSTRINGaudio_minimax3/%date:yyyy-MM-dd%/Base path relative to ComfyUI's output directory. Date placeholders such as %date:yyyy-MM-dd% are expanded by the saver/path logic; all subdirectories below are appended to this base.
    original_subdirSTRING32flac/Subfolder for untouched/original MiniMax audio, typically the 32 kHz FLAC archive.
    sr_flac_subdirSTRING48flac/Subfolder for the final/upscaled lossless FLAC output. The name is only a folder label; actual sample rate comes from the audio signal entering the saver.
    sr_mp3_subdirSTRING48mp3/Subfolder for final/preview MP3 output. The name is only a folder label; encoder quality is controlled in the saver node.
    artwork_subdirSTRINGartwork/Subfolder for generated cover JPG files. The same base filename is used so cover embedding can be matched to the song.
    append_variant_indexBOOLEANtrueAppend the run/variant number to filenames when multiple variants are generated. Recommended to avoid collisions and keep variants easy to associate with metadata.
    variant_paddingINT21–6Number of digits used for the variant suffix, for example 2 produces _01 and 3 produces _001.
    run_indexoptINT1-based variant index for the current song run. It is used for reproducible metadata and optional filename suffixes.
    variant_countoptINTTotal number of variants produced from the current source. Used for metadata and to decide whether a variant index should be appended.

    Outputs (4)

    NameTypeDescription
    original_prefixSTRING
    sr_flac_prefixSTRING
    sr_mp3_prefixSTRING
    artwork_prefixSTRING