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

fix: refuse text-only local video models for footage production at start (#10457)

[._.]/ Adam Eivy59d6e93f50e5
diff --git a/client/src/components/musicVideo/ToolPicker.jsx b/client/src/components/musicVideo/ToolPicker.jsx
index 0cdc5f52e7..77d8c9c963 100644
--- a/client/src/components/musicVideo/ToolPicker.jsx
+++ b/client/src/components/musicVideo/ToolPicker.jsx
@@ -18,7 +18,9 @@ const inputClass = 'w-full min-w-0 bg-port-bg border border-port-border rounded
* A pin the catalog no longer lists stays selected, so a save cannot drop it.
*/
function localModelSelectState({ catalog, failed, pinned, kind }) {
- const models = Array.isArray(catalog?.models) ? catalog.models : [];
+ // Footage production always animates a frame, so a text-only video model can never render a clip.
+ const models = (Array.isArray(catalog?.models) ? catalog.models : [])
+ .filter((model) => kind !== 'video' || !Array.isArray(model.supportedModes) || model.supportedModes.includes('image'));
const loading = catalog == null && !failed;
const defaultId = typeof catalog?.defaultModel === 'string' ? catalog.defaultModel : '';
const defaultName = models.find((model) => model.id === defaultId)?.name || defaultId;
diff --git a/server/services/musicVideo/autonomousService.js b/server/services/musicVideo/autonomousService.js
index d0268963db..7ce032b7f7 100644
--- a/server/services/musicVideo/autonomousService.js
+++ b/server/services/musicVideo/autonomousService.js
@@ -59,6 +59,7 @@ import { PATHS } from '../../lib/fileUtils.js';
import { probeVideoDuration } from '../../lib/ffmpeg.js';
import { ServerError } from '../../lib/errorHandler.js';
import { trimTo } from '../../lib/textUtils.js';
+import { assertFootageVideoModelsCapable, loadPoolEnv } from './productionPool.js';
import {
AUTONOMOUS_DEFAULT_LIMITS,
AUTONOMOUS_LIVE_STATUSES,
@@ -1003,6 +1004,10 @@ export async function startAutonomousVideo(input, { autoApproveAuthorized = fals
const brief = { ...normalizeAutonomousBrief(input), ...autoApproveGrant(input?.autoApprove, autoApproveAuthorized) };
if (!brief.prompt) throw runError(400, 'VALIDATION_ERROR', 'A prompt is required');
if (brief.orchestrator) Object.assign(brief, orchestratorGrant(autoApproveAuthorized));
+ const footagePool = autonomousPool(brief.tools, brief.models);
+ if (footagePool.some((route) => route.kind === 'video' && route.model)) {
+ await assertFootageVideoModelsCapable(footagePool, await loadPoolEnv());
+ }
const now = new Date().toISOString();
const created = await deps.createProject({
name: brief.name || trimTo(brief.prompt.replace(/\s+/g, ' '), 60) || 'Autonomous music video',
diff --git a/server/services/musicVideo/productionPool.js b/server/services/musicVideo/productionPool.js
index f20141b28c..e8ed23b5ab 100644
--- a/server/services/musicVideo/productionPool.js
+++ b/server/services/musicVideo/productionPool.js
@@ -32,6 +32,7 @@ import { musicVideoConditioningReferences } from '../../lib/musicVideoConditioni
import { MUSIC_VIDEO_AUTOMATION_TOOLS } from '../../lib/musicVideoAutomation.js';
import { falSceneTake, isPerformanceScene, performanceBlockedReason } from '../../lib/musicVideoShotTiming.js';
import { maxInputImages, supportsCloudModelOverride } from '../../lib/imageGenCapabilities.js';
+import { resolveVideoSupportedModes } from '../../lib/videoModeProfiles.js';
import { isHardwareCompatible } from '../../lib/systemCapabilities.js';
import { RUNNER_FAMILIES } from '../../lib/runners.js';
import { poolHasRoute, routeKey } from './production.js';
@@ -170,6 +171,10 @@ async function routeEligibility(route, env) {
const label = requested || modelId || '(none)';
if (!model) return { ok: false, reason: `Local video model "${label}" is not installed` };
if (!isHardwareCompatible(model.hardwareCompatibility)) return { ok: false, reason: `Local video model "${label}" cannot run on this hardware` };
+ // Footage always animates a generated or chosen frame, so the model must take an image.
+ if (!resolveVideoSupportedModes(model).includes('image')) {
+ return { ok: false, reason: `Local video model "${model.name || label}" does not support image-to-video, which footage production needs — choose another video model` };
+ }
}
return { ok: true, reason: null };
}
@@ -205,6 +210,22 @@ export async function routeUnavailableReason(route, requirement, env) {
return ok ? routeIncapableReason(route, requirement, env) : reason;
}
+/**
+ * Refuse a pinned local video model that cannot animate a frame, so a text-only
+ * model fails the start request instead of the first clip. Narrower than
+ * assertPoolEligible: it ignores install state (keys, toggles) the run may still fix.
+ */
+export async function assertFootageVideoModelsCapable(pool, env) {
+ for (const route of pool) {
+ const pinned = route.kind === 'video' && route.mode === 'local' && typeof route.model === 'string' ? route.model.trim() : '';
+ if (!pinned) continue;
+ const { model } = await env.resolveVideoModel(pinned);
+ if (model && !resolveVideoSupportedModes(model).includes('image')) {
+ throw new ServerError(`Local video model "${model.name || pinned}" does not support image-to-video, which footage production needs — choose another video model`, { status: 400, code: 'VIDEO_MODEL_TEXT_ONLY', context: { model: pinned } });
+ }
+ }
+}
+
/** Start-time check: every route in the pool must be eligible now. Throws 409 with every reason. */
export async function assertPoolEligible(pool, env) {
const problems = [];
diff --git a/server/services/musicVideo/productionPool.test.js b/server/services/musicVideo/productionPool.test.js
index b24382e064..bd8096bbda 100644
--- a/server/services/musicVideo/productionPool.test.js
+++ b/server/services/musicVideo/productionPool.test.js
@@ -1,5 +1,5 @@
import { describe, expect, it } from 'vitest';
-import { assertPoolEligible } from './productionPool.js';
+import { assertFootageVideoModelsCapable, assertPoolEligible } from './productionPool.js';
// Blank local-video pins are the install default. The renderer already resolves
// that omission; Start must accept the same route instead of demanding an id.
@@ -28,6 +28,21 @@ describe('local video pool eligibility', () => {
});
});
+describe('text-only local video models (footage needs image-to-video)', () => {
+ const textOnly = async (id) => ({ model: { id, name: 'Example Text Model', supportedModes: ['text'] }, modelId: id });
+ const route = { kind: 'video', mode: 'local', model: 'example-text' };
+ it('refuses a text-only pin at Start, naming the model and the missing capability', async () => {
+ await expect(assertPoolEligible([route], envFor(textOnly))).rejects.toThrow(/Example Text Model.*image-to-video/);
+ });
+ it('refuses it for an autopilot start with a 400, but ignores unpinned and image-capable routes', async () => {
+ await expect(assertFootageVideoModelsCapable([route], envFor(textOnly)))
+ .rejects.toMatchObject({ status: 400, code: 'VIDEO_MODEL_TEXT_ONLY', message: expect.stringMatching(/Example Text Model.*image-to-video/) });
+ const capable = async (id) => ({ model: { id, supportedModes: ['text', 'image'] }, modelId: id });
+ await expect(assertFootageVideoModelsCapable([route], envFor(capable))).resolves.toBeUndefined();
+ await expect(assertFootageVideoModelsCapable([{ kind: 'video', mode: 'local' }], envFor(textOnly))).resolves.toBeUndefined();
+ });
+});
+
describe('local image pool eligibility', () => {
const route = { kind: 'image', mode: 'local' };
const imageEnv = (models, pin) => ({