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:
+18
-18
@@ -33,7 +33,7 @@ export function resolveSize(aspect, source, fallback = {width:1344,height:768},
|
||||
|
||||
export { ASPECT_IDS }
|
||||
|
||||
export function bindClip(form, clip, xaigen = false, memory) {
|
||||
export function bindClip(form, clip, memory) {
|
||||
if (!clip?.id) return form
|
||||
const saved = clip.studio2 || clip.job || {}
|
||||
const settings = saved.settings || clip.settings || {}
|
||||
@@ -44,14 +44,14 @@ export function bindClip(form, clip, xaigen = false, memory) {
|
||||
try { next.settings[key] = typeof structuredClone === 'function' ? structuredClone(settings[key]) : JSON.parse(JSON.stringify(settings[key])) }
|
||||
catch { next.settings[key] = settings[key] }
|
||||
}
|
||||
next.engine = xaigen && (saved.engine || clip.engine)==='ltx' ? 'ltx' : 'minimax'
|
||||
next.engine = 'minimax'
|
||||
if (saved.identityStillId) next.identityStillId = saved.identityStillId
|
||||
for (const key of ['lockFace','lockOutfit']) if (typeof saved[key] === 'boolean') next[key] = saved[key]
|
||||
return restoreLoras(next,settings.loraStack,xaigen,memory)
|
||||
return restoreLoras(next,settings.loraStack,memory)
|
||||
}
|
||||
export function restoreAsset(form, item, xaigen = false, memory) {
|
||||
export function restoreAsset(form, item, memory) {
|
||||
if (item.kind==='clip' || item.studio2?.kind==='video') {
|
||||
const next=bindClip(form,item,xaigen,memory)
|
||||
const next=bindClip(form,item,memory)
|
||||
const seed=item.studio2?.settings?.seed ?? item.settings?.seed ?? item.seed
|
||||
if (seed != null) next.settings.seed=seed
|
||||
next.settings.seedMode='random'
|
||||
@@ -65,16 +65,16 @@ export function restoreAsset(form, item, xaigen = false, memory) {
|
||||
next.imageAId=item.id
|
||||
next.startClipId=''
|
||||
next.settings.aspect=item.studio2?.settings?.aspect || item.settings?.aspect || 'auto'
|
||||
return restoreLoras(next,item.studio2?.settings?.loraStack ?? item.settings?.loraStack,xaigen,memory)
|
||||
return restoreLoras(next,item.studio2?.settings?.loraStack ?? item.settings?.loraStack,memory)
|
||||
}
|
||||
export function extendSelected(form, clip, xaigen = false, memory) {
|
||||
const next = { ...form, settings:{...form.settings}, mode: 'extend', engine: xaigen && form.engine === 'ltx' ? 'ltx' : 'minimax' }
|
||||
export function extendSelected(form, clip, memory) {
|
||||
const next = { ...form, settings:{...form.settings}, mode: 'extend', engine: 'minimax' }
|
||||
const target = clip?.id ? clip : null
|
||||
if (!target?.id) return restoreLoras(next,loraUse(form)===loraUse(next)?form.settings?.loraStack:[],xaigen,memory)
|
||||
if (!target?.id) return restoreLoras(next,loraUse(form)===loraUse(next)?form.settings?.loraStack:[],memory)
|
||||
// Already bound to this clip: switching task must not stomp the user's overrides
|
||||
// (locks, CFG, etc.) by re-copying the clip's saved settings over them.
|
||||
if (form.startClipId === target.id) return restoreLoras(next,loraUse(form)===loraUse(next)?form.settings?.loraStack:[],xaigen,memory)
|
||||
try { return bindClip(next, target, xaigen, memory) }
|
||||
if (form.startClipId === target.id) return restoreLoras(next,loraUse(form)===loraUse(next)?form.settings?.loraStack:[],memory)
|
||||
try { return bindClip(next, target, memory) }
|
||||
catch { return { ...next, startClipId: target.id } }
|
||||
}
|
||||
export function changeSource(form) {
|
||||
@@ -85,7 +85,7 @@ export function useAsHero(form, item) { return {...form,identityStillId:item.id}
|
||||
export function useAsSource(form, item) { return {...form,imageAId:item.id} }
|
||||
|
||||
/** Hydrate the live bench from a saved Studio 2 request (Load). Does not enqueue. */
|
||||
export function hydrateStudio2Job(form, saved, { stillIds = new Set(), clipIds = new Set(), xaigen = false, memory } = {}) {
|
||||
export function hydrateStudio2Job(form, saved, { stillIds = new Set(), clipIds = new Set(), memory } = {}) {
|
||||
const src = structuredClone(saved?.studio2 || saved || {})
|
||||
const missing = []
|
||||
const keepStill = (id, label) => {
|
||||
@@ -104,8 +104,8 @@ export function hydrateStudio2Job(form, saved, { stillIds = new Set(), clipIds =
|
||||
}
|
||||
const modeRaw = src.mode === 'iterate' ? 'edit' : src.mode
|
||||
const mode = ['generate','edit','compose','refine','video','extend','music'].includes(modeRaw) ? modeRaw : 'edit'
|
||||
let engine = src.engine === 'moss' ? 'moss' : src.engine === 'qwen21' ? 'qwen21' : src.engine === 'krea' ? 'krea' : src.engine === 'ltx' ? 'ltx' : src.engine === 'minimax' ? 'minimax' : 'flux'
|
||||
if (['video','extend'].includes(mode)) engine = xaigen && engine === 'ltx' ? 'ltx' : 'minimax'
|
||||
let engine = src.engine === 'moss' ? 'moss' : src.engine === 'qwen21' ? 'qwen21' : src.engine === 'krea' ? 'krea' : src.engine === 'minimax' ? 'minimax' : 'flux'
|
||||
if (['video','extend'].includes(mode)) engine = 'minimax'
|
||||
else if (engine === 'minimax' || engine === 'ltx') engine = 'flux'
|
||||
const settings = structuredClone(src.settings || {})
|
||||
const aspect = ASPECT_IDS.has(settings.aspect) ? settings.aspect : 'auto'
|
||||
@@ -146,15 +146,15 @@ export function hydrateStudio2Job(form, saved, { stillIds = new Set(), clipIds =
|
||||
loraStack
|
||||
}
|
||||
}
|
||||
return { form: restoreLoras(next, loraStack, xaigen, memory), missing: missing[0] || '', warnings: missing }
|
||||
return { form: restoreLoras(next, loraStack, memory), missing: missing[0] || '', warnings: missing }
|
||||
}
|
||||
|
||||
export function restoreAll(form,item,xaigen=false,memory) {
|
||||
export function restoreAll(form,item,memory) {
|
||||
const restored=restoreInput(item),next={...form,...restored,settings:{...form.settings,...restored.settings,seedMode:'random'}}
|
||||
if(item.kind==='clip') return {...bindClip(next,item,xaigen,memory),mode:'extend'}
|
||||
if(item.kind==='clip') return {...bindClip(next,item,memory),mode:'extend'}
|
||||
next.mode=restored.mode==='iterate'?'edit':restored.mode || 'edit'
|
||||
next.engine=restored.engine==='moss'?'moss':restored.engine==='qwen21'?'qwen21':restored.engine==='krea'?'krea':'flux'
|
||||
next.imageAId=item.id
|
||||
next.startClipId=''
|
||||
return restoreLoras(next,item.studio2?.settings?.loraStack ?? item.settings?.loraStack,xaigen,memory)
|
||||
return restoreLoras(next,item.studio2?.settings?.loraStack ?? item.settings?.loraStack,memory)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user