Add LoRA stacks with per-item strengths and named video/image generation presets so setups survive reload without mixing Klein onto MiniMax. Keep LTX Pink Cherry and xAIGen LoRAs on xAIGen, and run Recommend on Beast.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -12,6 +12,25 @@ export function parseVideoWorkflow(raw: unknown): VideoWorkflowId {
|
||||
return 'v1'
|
||||
}
|
||||
|
||||
export const LTX_DISABLED_MESSAGE = 'LTX Pink Cherry is not available on this instance'
|
||||
|
||||
export function isXaigenStudio(publicConfig?: { studio?: unknown; instanceName?: unknown }) {
|
||||
let pub = publicConfig
|
||||
if (!pub) {
|
||||
try {
|
||||
pub = useRuntimeConfig().public as { studio?: unknown; instanceName?: unknown }
|
||||
} catch {
|
||||
pub = {}
|
||||
}
|
||||
}
|
||||
return /^xaigen$/i.test(String(pub.studio || '').trim())
|
||||
|| /xaigen/i.test(String(pub.instanceName || '').trim())
|
||||
}
|
||||
|
||||
export function ltxWorkflowEnabled(publicConfig?: { studio?: unknown; instanceName?: unknown }) {
|
||||
return isXaigenStudio(publicConfig)
|
||||
}
|
||||
|
||||
export function videoEngineOf(id: VideoWorkflowId): VideoEngineId {
|
||||
return id.startsWith('ltx') ? 'ltx' : 'minimax'
|
||||
}
|
||||
@@ -44,6 +63,12 @@ export function composeVideoWorkflow(engine: VideoEngineId, start: VideoStartId,
|
||||
return graph === 'v2' ? 'v2' : 'v1'
|
||||
}
|
||||
|
||||
export function coerceVideoWorkflow(raw: unknown, allowLtx?: boolean): VideoWorkflowId {
|
||||
const id = parseVideoWorkflow(raw)
|
||||
if ((allowLtx ?? ltxWorkflowEnabled()) || !isLtxWorkflow(id)) return id
|
||||
return composeVideoWorkflow('minimax', videoStartOf(id), 'v1')
|
||||
}
|
||||
|
||||
export function defaultVideoSteps(turbo: boolean, workflow: string = 'v1') {
|
||||
const id = parseVideoWorkflow(workflow)
|
||||
if (!turbo) return isLtxWorkflow(id) ? 12 : 20
|
||||
|
||||
Reference in New Issue
Block a user