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:
Towsty
2026-08-28 15:24:44 -05:00
co-authored by Cursor
parent 0af3cddb14
commit f8db0d626a
36 changed files with 1767 additions and 246 deletions
+25
View File
@@ -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