Generate a Song (MiniMax Music 3)
Uses MiniMax Music 3, the newest open music generation model found. For comparisons with other candidates and licensing see references/models.md.
The directory of this skill is referred to as $SKILL (shown as Base directory when loading).
Prerequisites
- Runs on a single GPU (diffusers version). Required VRAM: ~24GB as-is, ~22GB with
--offload cpu, ~8GB with--offload stream(slower). - Tested on: AMD Radeon AI PRO R9700 (32GB, ROCm 6.4 with PyTorch 2.9.1). A 60-second song took about 5 minutes, roughly 5x real-time. Not yet tested on NVIDIA GPUs (official expectation is CUDA).
- Weights are about 27GB. Make sure enough free disk space is available first.
- The official fast method (SGLang-Omni) requires two CUDA GPUs, so it is not used in this skill.
1. Prepare the Environment (First time only)
Use an existing environment if one is available (e.g., .venv* under a cloned MiniMax-Music3). Create one if not.
git clone https://github.com/MiniMax-AI/MiniMax-Music3.git && cd MiniMax-Music3
uv venv -p 3.12 .venv && source .venv/bin/activate
# NVIDIA: uv pip install torch torchaudio
# AMD: uv pip install torch torchaudio --index-url https://download.pytorch.org/whl/rocm6.4
uv pip install "diffusers==0.41.0" transformers accelerate soundfile huggingface_hub
# Do not download files only used by the SGLang version. Use --exclude per pattern.
hf download MiniMaxAI/MiniMax-Music3 --exclude "qwen_7B/qwen_7B/model-*" \
--exclude flowmatching_vae.pth --exclude dav.pth --exclude "figures/*"
- The model card includes steps to install an unmerged diffusers commit, but that will fail to load
transformer. Use a merged release (0.40.0 or later, verified with 0.41.0). - If the Hugging Face cache (
HF_HOME) disk is full, pointHF_HOMEto a location with free space. - Setting
HF_HUB_OFFLINE=1causestransformerloading to fail. Do not set it.
2. Write the Lyrics and Song Description
Create song.json.
{
"name": "yoru-no-machi",
"prompt": "Global Metadata: Japanese city pop, mid-tempo around 100 BPM, nostalgic night-drive mood that lifts into a bright chorus; polished 80s-inspired production. Vocal Details: warm female lead vocal singing in Japanese, airy in the verse, fuller with light harmonies in the chorus. Arrangement: intro with electric piano and slap bass; verse adds tight drums and muted guitar; chorus opens up with synth brass and lush pads; short outro on electric piano.",
"lyrics": "[intro]\n\n[verse]\n夜の街を ひとり歩く\nネオンの色が 揺れている\n\n[chorus]\nこのまま 朝まで\n君の声 探してる\n\n[outro]",
"duration": 180
}
- Write the song description (
prompt) in English, structured into three parts: Global Metadata (genre, tempo, emotional flow, production), Vocal Details (voice gender, timbre, singing style, harmonies), and Arrangement (instrument entries/exits per section). - Always specify the voice gender and timbre. Omitting it may result in the vocals disappearing, leaving only the accompaniment. To have the song sung in Japanese, also write
singing in Japanese. - When writing in detail, you can use the MiniMax official skill
music-caption-rewriter(npx skills add MiniMax-AI/MiniMax-Music3 --skill music-caption-rewriteror copy the clonedskills/music-caption-rewriterto~/.claude/skills/). - Lyrics (
lyrics) can be written in Japanese kanji/kana as is (verified). The tags[intro],[verse],[pre-chorus],[chorus],[bridge],[instrumental],[solo],[outro]must be placed on their own separate lines. Any lyrics on the same line as a tag will be ignored (the script detects and stops). - Keep each line short and align character counts for lines at similar positions. Separate sections with blank lines (a general tip for music generation models; effectiveness not compared for MiniMax Music 3).
durationis the upper limit in seconds (10 to 300). The model may finish earlier. Including[intro]tends to lengthen the intro (e.g., about 25 seconds for a 60-second prototype).- Do not use real song or artist names to mimic them (prohibited by license; see below).
3. Generate
python $SKILL/scripts/generate.py song.json --out-dir songs/ --seeds 1 2 3
- Even with the same settings, different seeds produce different songs. Generate 2-3 candidates for the user to listen to and choose from. Claude cannot hear audio, so do not judge quality on its own.
- Takes time (on R9700, ~5x real time plus loading); execute in the background and wait for completion.
- Output:
<name>-seed<N>.wav(44.1kHz stereo), a corresponding.json(seed, duration, prompt, lyrics, time taken), and<name>-lyrics.txt(lyrics with tags removed for display). - To verify that the lyrics are being sung correctly, you can use transcription (requires
faster-whisper). During the intro, Whisper may erroneously repeat lyrics.
python $SKILL/scripts/check_lyrics.py songs/*.wav --language ja
4. Create an MV
Pass the selected song directly to the biim-motion skill's MV mode.
assets.music: The selected WAV filemusicLyrics: The content of<name>-lyrics.txt(without tags)musicMood: A short Japanese summary of the mood fromprompt- Record "Generated with MiniMax Music 3 (seed,
prompt,lyrics)" in thereports/delivery.mdadopted materials of the MV.
License (MiniMax-Music3 Community License)
The original text is at https://huggingface.co/MiniMaxAI/MiniMax-Music3/blob/main/LICENSE . Only key points are listed here (this is not legal advice).
- If used in a commercial product or service, display "MiniMax-Music3" prominently on its screen. If annual revenue exceeds $20 million, separate written permission from MiniMax is required.
- Follow the accompanying Acceptable Use Policy and do not infringe third-party intellectual property rights.
- If intending to use commercially, inform the user of these conditions before generation.