Nodes/comfyui-acemusic/AceMusic Create Sample (Keyword Heuristic)
ComfyUI Node

AceMusic Create Sample (Keyword Heuristic)

Ask for 'a cheerful pop song' and get caption, lyrics, BPM, and key — via keywords, not magic

By hiroki-abe-58·Created 7 months ago·Updated 7 months ago· 42
AceMusic Create Sample (Keyword Heuristic)
  • model
  • caption
  • lyrics
  • bpm
  • keyscale
  • duration
queryA cheerful pop song about summer
instrumentalfalse
vocal_languageunknown
duration30

AceMusic Create Sample (Keyword Heuristic) is the pack's "describe the song in plain English and get a full spec back" node - with the emphasis, per the display name, on heuristic. You type a query like "A cheerful pop song about summer," and out come five values: caption, lyrics, bpm, keyscale, and duration. The hook is that you can chain these straight into AceMusic Conditioning and then into AceMusic Generator (from Conditioning) for a one-shot "I said what I wanted, the workflow did the rest" pipeline.

But here's the honest part, and the parenthetical in the name is there for a reason: there is no AI in this node yet. ACE-Step 1.0 has no create_sample() API, so the pack falls back to keyword matching. Read the words in your query and guess:

  • "fast", "energetic", "dance", "edm", "techno" → 140 BPM
  • "slow", "ballad", "calm", "ambient" → 80 BPM
  • "rock", "punk", "metal" → 130 BPM; "jazz", "swing" → 110; "hip hop", "rap" → 90
  • "sad", "melancholic", "dark" → A Minor; "happy", "cheerful", "bright" → C Major; "epic", "powerful" → D Major
  • anything unmatched → 120 BPM, C Major (the "I have no idea" defaults)

It's a lookup table with mood words as keys, not understanding. Know that going in and it stops being disappointing and starts being predictable: the caption output is your query verbatim, the lyrics are a placeholder [Verse]/[Chorus] template built from your query text, and the BPM/key are guesses from the word list. The outputs are still perfectly usable - they just reflect the limits of the heuristic.

Inputs: model (required, though it's not really used in heuristic mode - it's there for the future AI path), query (the description), and optional instrumental, vocal_language, and duration (the length of the sample, default 30).

How it works

The code checks whether the pipeline has a create_sample() method (future ACE-Step), and if so delegates to it. Otherwise it runs the keyword inference and returns the five outputs. That future-proofing is the real story: this node is the pack's bet that ACE-Step will ship real sample generation, and when it does, the same node suddenly does the thing it currently only pretends to. Until then, treat it as a convenient default-filler - great for bootstrapping a workflow where you don't care about exact BPM, not great for anything where you do.

Installing it

Via ComfyUI Manager, search "ComfyUI-AceMusic", or:

cd ComfyUI/custom_nodes
git clone https://github.com/hiroki-abe-58/ComfyUI-AceMusic.git
cd ComfyUI-AceMusic
pip install -r requirements.txt
pip install git+https://github.com/ace-step/ACE-Step.git

Standard pack install plus the separate ACE-Step engine (the fragile one with the pinned == requirements - relax them in a clone or install deps manually).

Common issues

  • Every query gives the same BPM/key - your query words don't hit the keyword list, so you're getting the 120/C Major defaults. Try the words in the list ("upbeat", "sad", "jazz") and watch it react.
  • The lyrics are just my query repeated - expected. It's a placeholder template until the AI path exists.
  • It needs a model to do keyword matching? - yes, awkwardly, the model input is required. Have the Model Loader in the graph.
  • Expecting it to actually compose a song - that's not this node; it only produces the spec. Feed the outputs through Conditioning + Generator-from-Cond to get audio.

It's a placeholder with a clear upgrade path, which is more than most placeholder nodes offer. In a year it might be the pack's most useful node; today it's a mood-based BPM guesser that happens to wire cleanly.

CategoryAceMusic/Analysis

Inputs (5)

NameTypeDefaultDescription
modelACEMUSIC_MODEL
querySTRINGA cheerful pop song about summer
instrumentaloptBOOLEANfalse
vocal_languageoptCOMBOunknown11 options: unknown, en, zh, ja, ko, es, +5
durationoptFLOAT305–240

Outputs (5)

NameTypeDescription
captionSTRING
lyricsSTRING
bpmINT
keyscaleSTRING
durationFLOAT