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:
@@ -2,21 +2,21 @@ import {filterLoraStackForUse} from '../../utils/loras.ts'
|
||||
|
||||
export function loraUse(form) {
|
||||
const video=['video','extend'].includes(form.mode)
|
||||
if (video) return form.engine==='ltx'?'ltx':'minimax'
|
||||
if (video) return 'minimax'
|
||||
if (form.engine==='qwen21') return 'qwen21'
|
||||
if (form.engine==='moss') return 'moss'
|
||||
return form.engine==='krea'?'krea':'flux'
|
||||
}
|
||||
|
||||
// One controller per bench. Storage is optional (SSR/private browsing still works).
|
||||
export function createLoraMemory(xaigen, storage) {
|
||||
export function createLoraMemory(storage) {
|
||||
const stacks={}
|
||||
let active=null
|
||||
const key=`studio2-lora-stacks:${xaigen?'xaigen':'aigen'}`
|
||||
const key='studio2-lora-stacks:aigen'
|
||||
try { Object.assign(stacks,JSON.parse(storage?.getItem(key)||'{}')) } catch {}
|
||||
const load=use=>filterLoraStackForUse(stacks[use],use,xaigen)
|
||||
const load=use=>filterLoraStackForUse(stacks[use],use)
|
||||
const save=(use,stack)=>{
|
||||
stacks[use]=filterLoraStackForUse(stack,use,xaigen)
|
||||
stacks[use]=filterLoraStackForUse(stack,use)
|
||||
try { storage?.setItem(key,JSON.stringify(stacks)) } catch {}
|
||||
}
|
||||
return {
|
||||
@@ -31,7 +31,7 @@ export function createLoraMemory(xaigen, storage) {
|
||||
},
|
||||
restore(form,stack) {
|
||||
const use=loraUse(form)
|
||||
form.settings.loraStack=stack?.length ? filterLoraStackForUse(stack,use,xaigen) : load(use)
|
||||
form.settings.loraStack=stack?.length ? filterLoraStackForUse(stack,use) : load(use)
|
||||
active=use
|
||||
save(use,form.settings.loraStack)
|
||||
return form
|
||||
@@ -39,8 +39,8 @@ export function createLoraMemory(xaigen, storage) {
|
||||
}
|
||||
}
|
||||
|
||||
export function restoreLoras(form, stack, xaigen=false, memory) {
|
||||
export function restoreLoras(form, stack, memory) {
|
||||
if(memory) return memory.restore(form,stack)
|
||||
form.settings.loraStack=filterLoraStackForUse(stack,loraUse(form),xaigen)
|
||||
form.settings.loraStack=filterLoraStackForUse(stack,loraUse(form))
|
||||
return form
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user