Nodes/ComfyUI-ElevenLabs-Pro/ElevenLabs Pro - Music Composition Plan
ComfyUI Node

ElevenLabs Pro - Music Composition Plan

Music Composition Plan

By IxMxAMAR·Created 7 months ago·Updated 23 days ago· 1
ElevenLabs Pro - Music Composition Plan
    • composition_plan
    ◄api_key►
    ◄prompt►
    ◄modelmusic_v1►
    ◄duration_seconds0►

    Prompt-only music generation is a slot machine for song structure. You type "moody synthwave with a big chorus" and you get something that is undeniably moody synthwave and may or may not have a chorus, a bridge, or anything you'd call an arrangement. This node is the fix for that: it takes a text prompt and returns a composition plan - the section-by-section structure of the song, as JSON - which you can read, edit, and then feed into Music Generation.

    It generates no audio. That's the whole point. It's the cheap half of a two-call round trip that stops you from re-rolling the expensive half.

    Why you'd reach for it

    Same reason you might sketch a layout before rendering. A plan is legible in a way that a music prompt isn't: you can see that the model intends a 12-second intro, two verses, a chorus that repeats at 1:40, and an outro - and then change them. Rename sections, reorder them, stretch the solo, kill the bridge. Music Generation accepts the plan as a composition_plan input where it overrides the plain prompt, so the edited JSON is the actual score the model follows.

    The place this really earns its keep is matching music to existing footage. If you have a 47-second cut and you need the drop to land at 0:31, a prompt will not get you there; a plan whose section durations you edited will. Set duration_seconds to the length you need, look at where the model put the sections, and nudge.

    Worth being honest about the alternative while you're here: on the open side, ACE-Step is the local answer to this whole problem - strong instrumentals, weak vocals, and it runs on a small card. ElevenLabs' music models are the route you take when you want the song to be credible rather than interesting, and you're paying per call for it.

    How it works

    It POSTs {prompt, model_id} - plus music_length_ms if you specified a duration - to ElevenLabs' /v1/music/plan endpoint and returns the response body as pretty-printed JSON. That's it. One request in, one JSON blob out, no audio, no file. Local validation happens first: if duration_seconds is set, it must be between 3 and 600 seconds, because that's the range the music endpoint itself will accept when the plan is later handed off.

    The inputs

    • api_key - required. Paste it, or leave it blank and set ELEVENLABS_API_KEY; there's also an ElevenLabs Pro - API Key node in the pack you can wire in once and forget.
    • prompt - required, multiline, and it's the only real creative input. Describe the song, not just a vibe: genre, instrumentation, tempo feel, mood, and what the structure should do. "Slow-building cinematic post-rock, solo piano into strings, one long crescendo, no vocals" gives the planner something to hang a plan on.
    • model - music_v1 (default), music_v2, or music_v2_5. Match whatever you're going to pass to Music Generation, so you aren't planning for one model and rendering with another.
    • duration_seconds - 3 to 600, or 0 to let the model decide. Note it is not the Music Generation default of 30. Here, 0 is the default, and it means "you pick."

    The output

    Just one: composition_plan, a STRING of JSON. Either read it in the node's output text so you know what you're about to get, or route it into the Music Generation node's composition_plan input and let it drive the render.

    Two behaviours to expect on that handoff. A plan carries its own length, so it overrides Music Generation's duration_seconds. And per the pack's changelog, Music Generation stops sending prompt-only fields like music_length_ms and force_instrumental when a plan is attached, because the API rejects the combination. So decide whether you want an instrumental before you commit to the plan path, not after.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/IxMxAMAR/ComfyUI-ElevenLabs-Pro.git
    pip install -r ComfyUI-ElevenLabs-Pro/requirements.txt
    

    Restart ComfyUI. requests and soundfile are the only dependencies; the node lands under ElevenLabs Pro/Music. Or search "ElevenLabs Pro" in ComfyUI Manager, which does the clone and the pip install for you.

    Common issues

    "Prompt is empty." Caught locally before anything is billed.

    "duration_seconds must be 0 or between 3 and 600." The node re-checks the value in Python, so a workflow saved with an out-of-range duration fails loudly instead of quietly. Set it to 0 if you don't care.

    It costs credits and returns no audio. Yes. That's the deal - a planning call plus a generation call, where a prompt-only render would have been one call. It pays for itself the first time it saves you three re-rolls at three minutes each, and it doesn't if you were going to accept whatever came out anyway.

    Not an output node, and it plans structure rather than words. Nothing downstream means nothing runs - wire composition_plan into Music Generation, and wire that into Save Audio. Lyrics and generation mode belong to Music Generation's own inputs; the planner is the arrangement step.

    CategoryElevenLabs Pro/Music

    Inputs (4)

    NameTypeDefaultDescription
    api_keySTRING—
    promptSTRINGText description of the song to plan.
    modeloptCOMBOmusic_v13 options: music_v1, music_v2, music_v2_5
    duration_secondsoptFLOAT00–600Length of the plan in seconds (3 - 600). 0 = let the model choose.

    Outputs (1)

    NameTypeDescription
    composition_planSTRING—