Skip to content

[PR #26] Add --nar-chunk to cap the acoustic chunk below what the context holds - #5

Merged
cynodesmus merged 1 commit into
cynodesmus:pr-26-nar-chunkfrom
timoncool:nar-chunk
Nov 19, 2026
Merged

cynodesmus merged 1 commit into
cynodesmus:pr-26-nar-chunkfrom
timoncool:nar-chunk

Conversation

@cynodesmus

Copy link
Copy Markdown
Owner

ServeurpersoCom#26
The acoustic stage cuts a song into chunks of (context - prefix - 3) / 2 frames, so the only way to make a chunk
smaller today is --max-seq, which also shrinks the room the semantic stage has for the song. Without flash
attention that is the lever people reach for, because a chunk's attention scores grow with the square of its length,
and it costs them the end of long songs.

--nar-chunk <frames> (yue-server and yue-synth) caps the chunk length on its own; 0, the default, keeps the
current rule. The semantic stage keeps the whole context.

Measured on an RTX 4090, Q8_0, --no-fa, the same request and seeds (a 240 s song, prompt 2549 tokens):

chunk (frames) peak VRAM over idle acoustic stage
6000 (one chunk, full context) 12.0 GB 97 s
3332 + 2718 (--max-seq 9216) 5.7 GB 65 s
3000 + 3000 + 100 (--nar-chunk 3000, full context) 5.9 GB 65 s

With flash attention on the same song takes 4.2 GB in one chunk and 3.5 GB in two. The level around the joins
matches the one-chunk render within 1–2 dB, with no gap.

README and ARCHITECTURE list the flag and say when it helps.

@cynodesmus
cynodesmus merged commit 50adaa9 into cynodesmus:pr-26-nar-chunk Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants