Nodes/ComfyUI-Music-Flamingo-Analyzer/Music Flamingo Analyzer
ComfyUI Node

Music Flamingo Analyzer

Turn any song into a music-generation prompt with Music Flamingo

By tavy315·Created 4 months ago·Updated 4 months ago· 2
Music Flamingo Analyzer
  • audio
  • description
model_idnvidia/music-flamingo-2601-hf
promptExtract the music DNA for prompt reuse. Provide BPM, musical key, primary instruments, genre tag, energy, mood, arrangement notes, and production style. Do not summarize lyrics or provide lyric themes. Keep it concise and structured.
quantization4bit
max_audio_seconds30
target_sample_rate16000
max_new_tokens992
unload_after_runfalse
compute_dtypeauto
double_quanttrue
local_files_onlyfalse
cpu_offloadfalse
audio_file_path

Here's the workflow problem this node solves: you've got a song you love, and you want Suno, ACE-Step, or whatever music model you're running to make something that feels like it. You can't hand a model an MP3, and typing "make it sound like this" gives you garbage. Music Flamingo Analyzer is the missing middle step - it runs NVIDIA's open Music Flamingo 2601 model locally inside ComfyUI and turns any audio file into a structured text description of the song's "music DNA": BPM, key, primary instruments, genre, energy, mood, arrangement, and production style. Feed that text to a music generation prompt, and you're suddenly working with something real instead of vibes.

It's a one-node pack, no API calls, no keys, everything runs on your own GPU. The model weights download on first use.

How it works

Under the hood it's just Transformers wrapped in a node. The node loads nvidia/music-flamingo-2601-hf through MusicFlamingoForConditionalGeneration (that's why it needs transformers>=4.48.0), then does its real work on your audio before the model ever sees it: it trims the clip to your max_audio_seconds window, collapses it to mono, and resamples it to 16 kHz - the model's native rate. The audio and your text prompt get stuffed into the model's chat template, generation runs greedily, and out comes one big text string.

The default prompt is worth reading, because it's opinionated: it asks for BPM, key, instruments, genre, energy, mood, arrangement, and production style, and explicitly says don't summarize lyrics. The node takes that seriously - if your prompt doesn't opt into lyrics, it post-processes the output to strip lyric sections out. The author's angle is prompt reuse, not song biographies.

The inputs that matter

Most of the widget list is set-and-forget. The ones you actually touch:

  • audio (AUDIO) - wire in whatever ComfyUI audio node you use to load files. There's also an optional audio_file_path text input if you'd rather just type a path.
  • prompt - the default DNA prompt is genuinely good. Edit it when you want the model to look at different things (like asking for lyrics deliberately).
  • quantization - defaults to 4bit (NF4 with nested/double quantization), which is the right call for most people. 8bit works but is the fiddliest path; none if you've got VRAM to burn.
  • max_audio_seconds - 30 is the model's native sweet spot, so leave it unless you have a reason. Crank it to 300 and you're just handing the model more audio than its attention can use.
  • max_new_tokens - how long the description can run. 992 is fine; lower it if you want tighter answers.

Where the description goes

The single output, description, is just a string. Show it in a text-display node, pipe it into a prompt-combiner, or append it as the generation suffix for Suno and friends. Same trick applies if you're captioning tracks for a music LoRA - that "write the caption by hand" chore people complain about in every music-training thread is exactly what this automates.

Install

Easiest is ComfyUI Manager: search "ComfyUI-Music-Flamingo-Analyzer" and install. Or the old-fashioned way:

cd ComfyUI/custom_nodes
git clone https://github.com/tavy315/ComfyUI-Music-Flamingo-Analyzer
python -m pip install -r requirements.txt   # in ComfyUI's Python env

The requirements are heavy-ish: transformers>=4.48.0, accelerate, torchaudio, and bitsandbytes (required for the default 4-bit path). First run downloads the model from Hugging Face, which is a chunky download - the author reports a few minutes per song on a 5060 Ti after that.

Gotchas

  • Transformers too old → you'll get an ImportError about MusicFlamingoForConditionalGeneration. Fix: python -m pip install --upgrade transformers accelerate.
  • 8-bit blows up → if Transformers reports modules dispatched to CPU or disk, that's the 8-bit loader failing to fit. Either drop to 4bit or enable cpu_offload (slower, but works).
  • Fresh ComfyUI process hits the network → after the first successful download, flip local_files_only on to stop remote metadata checks.
  • Model re-downloading every run? It shouldn't - the model is cached in memory keyed by settings. Keep unload_after_run=false to reuse it across runs; flip it on only when you want the VRAM back.

One honest caveat: this is a young, single-author pack, and the model itself is an early open release from NVIDIA. Treat the descriptions as a strong starting point, not gospel - then let the prompt engine do its thing.

Categoryaudio/MusicFlamingo

Inputs (13)

NameTypeDefaultDescription
audioAUDIO
model_idCOMBOnvidia/music-flamingo-2601-hf1 options: nvidia/music-flamingo-2601-hf
promptSTRINGExtract the music DNA for prompt reuse. Provide BPM, musical key, primary instruments, genre tag, energy, mood, arrangement notes, and production style. Do not summarize lyrics or provide lyric themes. Keep it concise and structured.
quantizationCOMBO4bit3 options: 4bit, 8bit, none
max_audio_secondsFLOAT301–300
target_sample_rateINT160008000–192000
max_new_tokensINT99232–1024
unload_after_runBOOLEANfalse
compute_dtypeCOMBOauto4 options: auto, bfloat16, float16, float32
double_quantBOOLEANtrue
local_files_onlyBOOLEANfalse
cpu_offloadBOOLEANfalse
audio_file_pathoptSTRING

Outputs (1)

NameTypeDescription
descriptionSTRING