Nodes/comfyui-fvmtools/Music · Verlaengern 2 · Session
ComfyUI Node

Music · Verlaengern 2 · Session

One queue run, one appended part — and undo that costs nothing

By ping1979ping·Created 7 months ago·Updated 2 days ago· 2
Music · Verlaengern 2 · Session
  • base_audio
  • session_json
  • full_abc
  • overview
  • parts
◄base_abc—►
◄style—►
◄lyrics—►
◄title—►
◄actionanhaengen►
◄session_name►

Extending a locally generated song in steps means you need somewhere to keep the steps. That's what this node opens: a session folder, one per song, where every appended part lives as its own FLAC alongside a state.json that records the score and the cut positions.

Step 2 of 6 (Session), and the mental model to get right is that one queue run appends at most one part. That is unusual for ComfyUI - you normally expect one queue press to produce one finished thing - and it's the single most confusing thing about the whole chain until it clicks. The chain is a state machine with a queue button, not a one-shot pipeline.

How the state is laid out

ComfyUI/output/fvm_song_extend/<session>/
    state.json        score, parts, cut positions, per-label loudness
    part_000.flac     the source song, copied in
    part_001.flac     first appended part (full render, overlap included)

Each part record stores only positions inside its own file - where its usable material starts, where it ends, what gain was applied. The final song is rebuilt fresh from the files every time you merge. That design choice is why "letzten Teil entfernen" is free: nothing was baked, so removing a part and re-rendering it costs you render time and nothing else. No generation loss from repeated encode/decode, no destructive edits.

The one input that changes everything

action:

  • anhaengen - this run appends a part. The normal case.
  • letzten Teil entfernen - undo the last part. Takes effect immediately, renders nothing.
  • zuruecksetzen - throw it all away and start over from the source.
  • nur zusammenfuegen - change nothing, just rebuild the merged result.

session_name is empty by default and then falls back to the song title. Fill it in when you're experimenting: different names are completely independent versions, which is how you A/B a chorus without destroying the take you liked.

The other five inputs - base_audio, base_abc, style, lyrics, title - are forced inputs from FVM_SongExtendSource. Connect all five. session_json is the token the rest of the chain passes around, and full_abc is the growing score, which is what the follow-up attempts to append to and what the current-extent timeline comes from.

Outputs: session_json, full_abc, overview, parts. Read overview - it lists every section in the score with its bar count and duration, which is the fastest way to see whether the thing you appended actually landed where you expected. parts as an integer is handy for a conditional: stop appending at N, then merge.

Install

ComfyUI Manager, search comfyui-fvmtools, or:

cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools

Restart, then find it under Add Node → FVMtools/music/extend. Pure file and numpy work - no extra dependencies.

Common issues

Nothing renders, but the run reports success. You're not on anhaengen. Undo, reset and merge-only are all designed to be immediate no-ops for the render side; FVM_SongExtendCommit checks the action and reports Aktion '...': nichts angehaengt. for anything else. That's the feature, not a bug.

You reset your working song by accident. zuruecksetzen deletes the accumulated parts. It does not touch the source song, and it doesn't ask twice. If you're iterating, use a new session_name instead of resetting.

Your session vanished. It lives under output/, so anything that clears ComfyUI's output directory takes it with it. Back the folder up once a session is worth keeping - those FLACs are rendered GPU time.

The chain re-runs the LLM every queue press, or seems to skip it. The session node deliberately invalidates itself every run (IS_CHANGED returns NaN) because a queue press is a step here - so anything downstream that reads the session token re-executes too, on purpose.

CategoryFVMtools/music/extend

Inputs (7)

NameTypeDefaultDescription
base_audioAUDIO—
base_abcSTRING—
styleSTRING—
lyricsSTRING—
titleSTRING—
actionCOMBOanhaengenanhaengen: dieser Queue-Lauf haengt einen Teil an. letzten Teil entfernen / zuruecksetzen: wirkt sofort, rendert nichts. nur zusammenfuegen: nichts aendern, nur das Ergebnis neu bauen.
session_nameSTRINGLeer = Songtitel. Verschiedene Namen = unabhaengige Versionen.

Outputs (4)

NameTypeDescription
session_jsonSTRING—
full_abcSTRING—
overviewSTRING—
partsINT—