Satyr Trim (Plan β Plan) π
Delete the 40-second intro YuE2 wrote for you
- abc
- report
- seconds
YuE2 writes long. A measured plan ran 4:33 for a lyric that AceStep had sung in 3:00, and 61 of its 171 bars - 98 seconds, 36% of the song - carried no sung note at all: a 40-second introduction, a 29-second outro, an interlude. The model obeys a bar count, so those bars are just time, and Satyr Trim cuts them out.
Dropping only the unsung bars took that plan to 3:45 with all 326 of its sung notes untouched, and the take came back livelier. That's the whole pitch.
How the cut works
This is a plan-to-plan edit: the ABC goes in, a shorter ABC comes out, nothing is rendered yet.
The unit of the cut is a group - one span both voices carry at once - and only groups whose Vocal line holds no note are even candidates. So the node's promise is structural, not statistical: it prints the sung-note count before and after, and refuses to return a plan where they differ. Melody, words, registers and both singers come through exactly as the model wrote them.
Which end survives depends on where the stretch sits. An introduction leads into the singing, so the last bars are kept - they're the approach. Everything else leads out of what it follows, so the first bars are kept and the trailing repetition goes. That's a small rule that makes the difference between a song that starts naturally and one that sounds sliced.
Two more details that make it behave:
- A stretch is a run of sections, not a section. An introduction is sometimes one
%label and sometimes four in a row; a limit applied per label would cut a four-label intro to four times the length you asked for. - Sections are classified by what's in them, not by their labels. A
% versethe model wrote with no vocal is an instrumental passage whatever it's called, and an% interludethat sings isn't a gap. A song that opens on a voice has no introduction to cut, however long its first instrumental section is. - Cuts land on group boundaries, so a plan written in four-bar groups trims four bars at a time and a limit is met from below rather than exactly. One deliberate exception: a limit above zero always keeps one group, so a six-second interlude asked for five seconds is shortened to itself rather than deleted. Zero is how you say delete this.
Inputs and outputs
abc- the plan, fromYuE2 Generate ABCor from Satyr Score.intro_seconds- default 12. How long the opening may run before anyone sings. This is where the time goes, and cutting it costs nothing because the bars removed hold no sung note.0removes the introduction entirely; a number larger than it leaves it alone.outro_seconds- default 12. How long the ending may run after the last word.between_seconds- default 8, and the one to leave generous. Instrumental stretches between sung sections are usually short already, and they're also the ones a song most misses when they go.verbose- print the report to the console.
Three outputs: abc (the shortened plan, into YuE2 Generate Music), report, and seconds - wire seconds into Empty YuE2 Latent Audio. That last wire is not optional in spirit: trim the plan and leave the latent at the old length and you get the song plus a lump of silence, or a cut-off ending. Plan and latent agreeing is the single rule of working with YuE2.
Wire it in after any plan edit and before the render. Satyr Trim β Satyr Score β Satyr Music is a sensible order, so the Score report describes the plan you're actually going to render rather than the one you had a minute ago.
Installing it
Part of the pack. ComfyUI Manager β search Kinburg-Nodes, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Kinburg/Kinburg-Nodes
Restart ComfyUI. Pure Python over a string - no models, no dependencies, nothing for the pack's install.py to do.
Where people get burned
Setting between_seconds to 0 because the intro cut sounded great. Intros and outros are dead air you gain from removing; interludes are the song breathing. Cut those and the track turns into a wall.
Forgetting seconds. The classic YuE2 mistake, and this node is the one that makes it easy to make - you shortened the plan, not the latent.
Expecting denser singing. The vocal sections of that measured plan ran 1.2β2.0 syllables a second, which is slow, and the bars carrying those words are untouched here. If a line drags, that's a lyrics-and-plan problem, not a trim problem.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| abc | STRING | The plan, from 'YuE2 Generate ABC' or from 'Satyr Score'. | |
| intro_seconds | FLOAT | 12.00β180 | How long the opening may run before anyone sings. This is where the time goes. A measured plan opened with 25 bars β 40 seconds β of instrumental before the first word, and YuE2 writes one like that often. Cutting it is the single biggest thing that can be done to a plan, and it costs nothing: the bars removed hold no sung note. The LAST bars are kept, not the first, because an introduction leads into the singing and its final bars are the approach. 0 removes the introduction entirely. A number larger than it is leaves it alone. |
| outro_seconds | FLOAT | 12.00β180 | How long the ending may run after the last word. A measured plan ran 29 seconds there. The FIRST bars are kept: an outro leads out of the singing, and what the model writes at the end of one is usually its own figure repeated. 0 removes it entirely. |
| between_seconds | FLOAT | 8.00β180 | How long any instrumental stretch BETWEEN sung sections may run β an interlude, a break, a drop, a solo. 0 removes them. These are usually short already, and they are also the ones a song most misses when they go, so this is the one to leave generous. |
| verbose | BOOLEAN | true | Print the report to the console. The same text is always on the 'report' output. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| abc | STRING | β |
| report | STRING | β |
| seconds | FLOAT | β |