Skip to content

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

Keep a project's music pin when a request names a model that is not a music lane

Claude92529a056a67
diff --git a/server/services/musicVideo/performanceShot.js b/server/services/musicVideo/performanceShot.js
index b8e9602542..2b4ded276f 100644
--- a/server/services/musicVideo/performanceShot.js
+++ b/server/services/musicVideo/performanceShot.js
@@ -48,6 +48,7 @@ import {
performanceCapability,
planPerformanceWindow,
selectedPerformanceInstruction,
+ SOURCE_AUDIO_MUSIC,
} from '../../lib/musicVideoShotTiming.js';
import { getProject } from './projects.js';
import { assertVocalStemTimebase, resolveVocalStemPath } from './vocalStem.js';
@@ -285,7 +286,8 @@ export async function preparePerformanceShot({ musicVideo, backend, sourceImageP
// A music-driven scene renders on the project's audio-to-video model; a
// lip-sync scene on the lip-sync route.
// A shot card can pick another music-driven model for this take (one PortOS curates, else the project's).
- const videoSettings = musicModelId ? { ...project.videoSettings, falMusicModelId: musicModelId } : project.videoSettings;
+ const picked = backend === 'fal' && musicModelId && Object.hasOwn(SOURCE_AUDIO_MUSIC.fal, musicModelId);
+ const videoSettings = picked ? { ...project.videoSettings, falMusicModelId: musicModelId } : project.videoSettings;
const capability = performanceCapability(backend, { scene, videoSettings });
if (!capability) throw refuse(performanceBlockedReason(backend), 'MUSIC_VIDEO_PERFORMANCE_UNSUPPORTED');
const musicDriven = capability.style === 'music';
diff --git a/server/services/musicVideo/performanceShot.test.js b/server/services/musicVideo/performanceShot.test.js
index 4672f67803..cefd506cc5 100644
--- a/server/services/musicVideo/performanceShot.test.js
+++ b/server/services/musicVideo/performanceShot.test.js
@@ -428,6 +428,16 @@ describe.skipIf(!ffmpeg)('music-video performance shot through the fal lip-sync
expect((await loadHistory()).find((h) => h.id === job.jobId)).toMatchObject({ modelId: `fal:${url}`, estimatedCostUsd: costUsd, audioDriven: true });
}, 60_000);
+ // Review on #11413: a stale card's cutaway model id must not replace the project's music pin.
+ it('keeps the project\'s music pin when the request names a model that is not a music lane', async () => {
+ getProject.mockResolvedValue({ ...project({ performanceStyle: 'music' }), videoSettings: { backend: 'fal', falMusicModelId: 'fal-ai/bytedance/omnihuman/v1.5' } });
+ const prepared = await preparePerformanceShot({
+ musicVideo: { projectId: 'mv-1', sceneId: 'mvs-1' }, backend: 'fal', sourceImagePath: '/x/frame.png', mode: 'image',
+ musicModelId: 'minimax/h3-max/image-to-video',
+ });
+ expect(prepared.modelId).toBe('fal-ai/bytedance/omnihuman/v1.5');
+ });
+
it('uses the full span of a long shot in one take, at the project\'s lip-sync resolution pin', async () => {
// 26s: past the old 14.8s cap (fal accepts up to 15 minutes; PortOS keeps
// a take to 30s so it stays one editable phrase).