Nodes/comfyui-acemusic/AceMusic Extend
ComfyUI Node

AceMusic Extend

Your song ends too soon — extend it forward or backward in one node

By hiroki-abe-58·Created 7 months ago·Updated 7 months ago· 42
AceMusic Extend
  • model
  • audio
  • audio
extend_left0
extend_right30
caption
lyrics
retake_variance0.50
inference_steps27
seed-1

AceMusic Extend is the node that grows a track past where it ended - or adds an intro you forgot. The Generator hands you a fixed-length song; Extend lets you say "give me another 30 seconds on the end" and get new music that continues the vibe, rather than a hard loop or a fade-to-nothing. For finishing a song that cuts off too abruptly, or for adding that cold-open intro, this is the tool.

Inputs:

  • model - from the Model Loader.
  • audio - the track to grow.
  • extend_left - seconds to add before the original (0–120). An intro, essentially.
  • extend_right - seconds to add after the original (0–120, default 30). The more common case - a longer outro.
  • caption - optional description of what the new material should feel like.
  • lyrics - optional words for the extended section.
  • retake_variance - how freely the new material may differ (0–1, default 0.5).
  • inference_steps and seed - the usual knobs.

One output: audio, the original plus the added seconds. And yes, you must set at least one of the extend values to something greater than zero - the node raises a clear error otherwise.

How it works

Extend is built on ACE-Step's extend task, which the engine implements as repainting outside the original audio's boundaries. The node measures the source duration, works out the new total length, and tells the pipeline to generate content in the region past the original end (for extend_right) or before the start (for extend_left), using the original as the reference so the new music matches in character.

One honest gotcha worth knowing before you build a workflow around both directions: the source code only handles one repaint region. If you set both extend_left and extend_right, the node extends to the right and effectively ignores the left extension - the code comments note ACE-Step can't do two separate regions, so right is what you get. Want both an intro and an outro? Chain two Extend nodes. Also expect the seconds to behave like the Repaint node's: the pipeline works with whole-second boundaries, so don't sweat sub-second precision.

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

The usual split install: pack first, then the ACE-Step engine separately. If the engine's pip install fails on pinned == versions (torchaudio, matplotlib), clone ACE-Step, loosen the pins to >=, and install editable or with --no-deps after installing deps by hand.

Common issues

  • "At least one of extend_left or extend_right must be greater than 0" - both are zero. Set one.
  • Extended section sounds like a different song - raise nothing, lower retake_variance; the new material should hug the original's character more closely. A descriptive caption helps too.
  • I asked for both an intro and an outro but only one happened - known limitation; the node extends right when both are set. Chain a second Extend node for the other side.
  • Long songs get slow - extended audio is a full regeneration at the new length; overlapped_decode on the Model Loader helps past ~48 seconds.

Extend pairs naturally with the other editing nodes: generate, Repaint the middle, Extend the ending. The pack was clearly built around that loop, and this is the finishing move in it.

CategoryAceMusic/Generation

Inputs (9)

NameTypeDefaultDescription
modelACEMUSIC_MODEL
audioAUDIO
extend_leftoptFLOAT00–120
extend_rightoptFLOAT300–120
captionoptSTRING
lyricsoptSTRING
retake_varianceoptFLOAT0.500–1
inference_stepsoptINT271–100
seedoptINT-1-1–2147483647

Outputs (1)

NameTypeDescription
audioAUDIO