Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
fix: send MiniMax Music 3 a lyric sheet for instrumentals
[._.]/ Adam Eivy91661973b10a
diff --git a/.changelog/next/fixed-main.md b/.changelog/next/fixed-main.mdindex 1a928c3338..eccb40fbb6 100644--- a/.changelog/next/fixed-main.md+++ b/.changelog/next/fixed-main.md@@ -9,3 +9,4 @@- Local music runtimes now build on a standalone Python instead of a conda base on Windows, where torch installs but cannot load (WinError 1114); an already-broken venv is rebuilt automatically- MusicGen is now shown as unavailable on non-Apple-Silicon machines rather than offering an Install button whose installer skips and reports a confusing failure- Installing MiniMax Music 3's model weights now actually downloads — the request was aborted before its first byte and the UI reported the no-op as a successful install+- Generating an instrumental with MiniMax Music 3 no longer fails — the model requires a lyric sheet, so an empty one is now sent as its documented [instrumental] section tagdiff --git a/server/services/pipeline/musicGen.js b/server/services/pipeline/musicGen.jsindex 449ca3b516..f32a948b04 100644--- a/server/services/pipeline/musicGen.js+++ b/server/services/pipeline/musicGen.js@@ -204,6 +204,13 @@ export const ENGINES = Object.freeze({installEnv: 'INSTALL_MINIMAX_MUSIC3',healthProbe: 'import torch; from diffusers import ModularPipeline',lyrics: true,+ // This checkpoint REJECTS empty lyrics — its tokenize step raises+ // "`lyrics` must be a non-empty string" before generation starts, so an+ // instrumental prompt cannot simply omit them. The model card's contract is+ // a structure-tag-only lyric sheet, and `[Instrumental]` is one of its+ // documented section tags. Engines without this field (ACE-Step) accept an+ // empty string and render an instrumental themselves.+ instrumentalLyrics: '[instrumental]',customModels: false,fixedModelInstall: true,cudaRequired: true,@@ -345,7 +352,13 @@ export function buildSidecarArgs({ engineId = DEFAULT_ENGINE_ID, pythonPath, scr'--output', outputPath,'--runtime-dir', runtimeDir ?? engine.runtimeDir,];- if (engine.lyrics) args.push('--lyrics', typeof lyrics === 'string' ? lyrics : '');+ if (engine.lyrics) {+ // Preserve the caller's string verbatim when they supplied one; substitute+ // only when it is absent or whitespace, and only for an engine that cannot+ // accept empty lyrics (see instrumentalLyrics).+ const provided = typeof lyrics === 'string' ? lyrics : '';+ args.push('--lyrics', provided.trim() ? provided : (engine.instrumentalLyrics || ''));+ }return { bin: pythonPath, args };}diff --git a/server/services/pipeline/musicGen.test.js b/server/services/pipeline/musicGen.test.jsindex c911f14fdd..4a716acc50 100644--- a/server/services/pipeline/musicGen.test.js+++ b/server/services/pipeline/musicGen.test.js@@ -569,3 +569,30 @@ describe('isEnginePlatformSupported', () => {expect(spawnCalls).toHaveLength(0);});});++describe('instrumental lyrics fallback', () => {+ const base = { pythonPath: '/venv/bin/python3', prompt: 'cinematic electronic instrumental', durationSec: 60, outputPath: '/tmp/out.wav' };+ const lyricsArg = (args) => args[args.indexOf('--lyrics') + 1];++ it('substitutes the documented [instrumental] tag when MiniMax Music 3 gets no lyrics', () => {+ // The checkpoint's tokenize step raises on an empty string, so an+ // instrumental prompt used to die with "`lyrics` must be a non-empty+ // string" after the model had already loaded.+ for (const lyrics of [undefined, '', ' ', '\n\t ']) {+ const { args } = buildSidecarArgs({ ...base, engineId: 'minimax-music3', repo: 'MiniMaxAI/MiniMax-Music3', lyrics });+ expect(lyricsArg(args), `lyrics=${JSON.stringify(lyrics)}`).toBe('[instrumental]');+ }+ });++ it('never touches lyrics the caller actually supplied', () => {+ const words = '[verse]\nExample words here';+ const { args } = buildSidecarArgs({ ...base, engineId: 'minimax-music3', repo: 'MiniMaxAI/MiniMax-Music3', lyrics: words });+ expect(lyricsArg(args)).toBe(words);+ });++ it('leaves ACE-Step empty — it renders an instrumental from empty lyrics itself', () => {+ expect(ENGINES.acestep.instrumentalLyrics).toBeUndefined();+ const { args } = buildSidecarArgs({ ...base, engineId: 'acestep', repo: 'ACE-Step/ACE-Step-v1-3.5B', lyrics: '' });+ expect(lyricsArg(args)).toBe('');+ });+});