Allow Studio 2 MiniMax text-to-video with empty start when locks are off.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -89,11 +89,12 @@ async function prepareGraph(r: any) {
|
||||
const { frameLength } = await import('../videoChain');
|
||||
const { ltxWorkflowEnabled, LTX_DISABLED_MESSAGE } = await import('~/utils/videoModels');
|
||||
if (!ltxWorkflowEnabled()) throw new Error(LTX_DISABLED_MESSAGE);
|
||||
if (!start) throw new Error('Choose a start still for LTX video.');
|
||||
const textToVideo = q.mode === 'video' && !start;
|
||||
if (!start && !textToVideo) throw new Error('Choose a start still for LTX video.');
|
||||
const fps = s.fps || 24;
|
||||
graph = buildWorkflow({
|
||||
workflow: 'ltx',
|
||||
imageName: start,
|
||||
workflow: textToVideo ? 'ltx-t2v' : 'ltx',
|
||||
imageName: start || '',
|
||||
prompt: q.compiledPrompt,
|
||||
width: s.width,
|
||||
height: s.height,
|
||||
@@ -111,7 +112,7 @@ async function prepareGraph(r: any) {
|
||||
useIdentityRefs: false
|
||||
});
|
||||
await ensureComfyLoraNames('video');
|
||||
r.graphId = 'workflow_ltx_video.json';
|
||||
r.graphId = textToVideo ? 'workflow_ltx_video.json#t2v' : 'workflow_ltx_video.json';
|
||||
} else {
|
||||
if (q.engine !== 'minimax')
|
||||
throw new Error('Studio 2 video supports MiniMax H3 and LTX (xAIGen).');
|
||||
|
||||
Reference in New Issue
Block a user