Add MiniMax and PinkCherry LTX as pickable video engines, with still or text start.
Shot 1 can run text-to-video; later shots still extend from the last frame. Recommend output is also normalized into shot-script cards. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
export type VideoEngineId = 'minimax' | 'ltx'
|
||||
export type VideoStartId = 'still' | 'text'
|
||||
export type MiniMaxGraphId = 'v1' | 'v2'
|
||||
export type VideoWorkflowId = 'v1' | 'v2' | 't2v' | 'ltx' | 'ltx-t2v'
|
||||
|
||||
export function parseVideoWorkflow(raw: unknown): VideoWorkflowId {
|
||||
const value = String(raw || '').trim()
|
||||
if (value === 'v2') return 'v2'
|
||||
if (value === 't2v') return 't2v'
|
||||
if (value === 'ltx' || value === 'ltx-i2v') return 'ltx'
|
||||
if (value === 'ltx-t2v') return 'ltx-t2v'
|
||||
return 'v1'
|
||||
}
|
||||
|
||||
export function videoEngineOf(id: VideoWorkflowId): VideoEngineId {
|
||||
return id.startsWith('ltx') ? 'ltx' : 'minimax'
|
||||
}
|
||||
|
||||
export function videoStartOf(id: VideoWorkflowId): VideoStartId {
|
||||
return id === 't2v' || id === 'ltx-t2v' ? 'text' : 'still'
|
||||
}
|
||||
|
||||
export function isLtxWorkflow(id: VideoWorkflowId) {
|
||||
return videoEngineOf(id) === 'ltx'
|
||||
}
|
||||
|
||||
export function isTextToVideo(id: VideoWorkflowId) {
|
||||
return videoStartOf(id) === 'text'
|
||||
}
|
||||
|
||||
export function minimaxGraphOf(id: VideoWorkflowId): MiniMaxGraphId {
|
||||
return id === 'v2' ? 'v2' : 'v1'
|
||||
}
|
||||
|
||||
export function workflowForExtension(id: VideoWorkflowId): VideoWorkflowId {
|
||||
if (id === 't2v') return 'v1'
|
||||
if (id === 'ltx-t2v') return 'ltx'
|
||||
return id
|
||||
}
|
||||
|
||||
export function composeVideoWorkflow(engine: VideoEngineId, start: VideoStartId, graph: MiniMaxGraphId = 'v1'): VideoWorkflowId {
|
||||
if (engine === 'ltx') return start === 'text' ? 'ltx-t2v' : 'ltx'
|
||||
if (start === 'text') return 't2v'
|
||||
return graph === 'v2' ? 'v2' : 'v1'
|
||||
}
|
||||
|
||||
export function defaultVideoSteps(turbo: boolean, workflow: string = 'v1') {
|
||||
const id = parseVideoWorkflow(workflow)
|
||||
if (!turbo) return isLtxWorkflow(id) ? 12 : 20
|
||||
if (isLtxWorkflow(id)) return 8
|
||||
return id === 'v2' ? 6 : 8
|
||||
}
|
||||
|
||||
export const LTX_UNET = 'PinkCherry_FineTune_int8_v1_8_LTX23.safetensors'
|
||||
export const LTX_DISTILLED_LORA = 'ltx-2.3-22b-distilled-lora-384-1.1.safetensors'
|
||||
export const LTX_NEGATIVE = 'blurry, low quality, jitter, deformed, static frame, freeze, watermark, bad anatomy, text, subtitles'
|
||||
Reference in New Issue
Block a user