Eliminate xAIGen and LTX; AIGen is the only studio.

Drop the studio split, backup-to-xAIGen link, and LTX engine option. Show all LoRAs on AIGen and remove the Photos show/hide inputs toggle so slots stay visible.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-10-27 17:55:59 -05:00
co-authored by Cursor
parent 2b603b1d58
commit 08caeb51de
38 changed files with 174 additions and 635 deletions
+16 -35
View File
@@ -1,6 +1,11 @@
export type VideoEngineId = 'minimax' | 'ltx'
export const LTX_NEGATIVE =
'blurry, low quality, jitter, deformed, static frame, freeze, watermark, bad anatomy, text, subtitles'
export const LTX_DISTILLED_LORA = 'ltx-2.3-22b-distilled.safetensors'
export type VideoEngineId = 'minimax'
export type VideoStartId = 'still' | 'text'
export type MiniMaxGraphId = 'v1' | 'v2'
/** Legacy `ltx` / `ltx-t2v` ids may still appear on old library rows; they coerce to MiniMax. */
export type VideoWorkflowId = 'v1' | 'v2' | 't2v' | 'ltx' | 'ltx-t2v'
export function parseVideoWorkflow(raw: unknown): VideoWorkflowId {
@@ -12,27 +17,8 @@ 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'
return 'minimax'
}
export function videoStartOf(id: VideoWorkflowId): VideoStartId {
@@ -40,7 +26,7 @@ export function videoStartOf(id: VideoWorkflowId): VideoStartId {
}
export function isLtxWorkflow(id: VideoWorkflowId) {
return videoEngineOf(id) === 'ltx'
return String(id || '').startsWith('ltx')
}
export function isTextToVideo(id: VideoWorkflowId) {
@@ -52,30 +38,25 @@ export function minimaxGraphOf(id: VideoWorkflowId): MiniMaxGraphId {
}
export function workflowForExtension(id: VideoWorkflowId): VideoWorkflowId {
if (id === 't2v') return 'v1'
if (id === 'ltx-t2v') return 'ltx'
if (id === 't2v' || id === 'ltx-t2v') return 'v1'
if (isLtxWorkflow(id)) return 'v1'
return id
}
export function composeVideoWorkflow(engine: VideoEngineId, start: VideoStartId, graph: MiniMaxGraphId = 'v1'): VideoWorkflowId {
if (engine === 'ltx') return start === 'text' ? 'ltx-t2v' : 'ltx'
export function composeVideoWorkflow(_engine: VideoEngineId, start: VideoStartId, graph: MiniMaxGraphId = 'v1'): VideoWorkflowId {
if (start === 'text') return 't2v'
return graph === 'v2' ? 'v2' : 'v1'
}
export function coerceVideoWorkflow(raw: unknown, allowLtx?: boolean): VideoWorkflowId {
/** Remap retired LTX workflows onto MiniMax. */
export function coerceVideoWorkflow(raw: unknown): VideoWorkflowId {
const id = parseVideoWorkflow(raw)
if ((allowLtx ?? ltxWorkflowEnabled()) || !isLtxWorkflow(id)) return id
if (!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
if (isLtxWorkflow(id)) return 8
const id = coerceVideoWorkflow(workflow)
if (!turbo) return 20
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'