Let MOSS use the same LoRA picker and chain those adapters onto its graph.

The picker was hidden and the API cleared every stack, so a selected MOSS job could not carry a LoRA.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-10-22 20:28:25 -05:00
co-authored by Cursor
parent 354f475866
commit 8602d6ed2e
11 changed files with 38 additions and 28 deletions
+6 -1
View File
@@ -7,6 +7,7 @@ import {useAsHero,useAsSource,restoreAll,hydrateStudio2Job} from '../shared/stud
import {toggleStyle,parseBatch,parseBatchDoubleBlank,stylePrompt} from '../shared/studio2/styles.mjs'
import {compilePrompt,validateRequest} from '../shared/studio2/contracts.mjs'
import {queueEngineLabel} from '../shared/studio2/queue-view.mjs'
import {filterLorasForUse,filterLoraStackForUse,loraMatchesImageEngine} from '../utils/loras.ts'
import {cachedLoras} from '../shared/studio2/lora-cache.mjs'
import {resolveQwen21Size} from '../shared/studio2/qwen21-size.mjs'
import {ensureQwen21EditPrompt,stitchQwen21PeEditPrompt,QWEN21_EDIT_KEEP_CHANGE} from '../shared/studio2/qwen21-edit.mjs'
@@ -105,7 +106,11 @@ test('moss is generate-only with its own steps and CFG',()=>{
assert.equal(q.settings.height,1024)
assert.equal(q.turbo,false)
assert.equal(q.enhancePrompt,false)
assert.deepEqual(q.settings.loraStack,[])
assert.deepEqual(q.settings.loraStack,[{name:'klein-anime.safetensors'}])
assert.deepEqual(filterLoraStackForUse(q.settings.loraStack,'moss',true),[])
assert.deepEqual(filterLorasForUse(['moss-style.safetensors','klein-anime.safetensors','krea-look.safetensors'],'moss'),['moss-style.safetensors'])
assert.equal(loraMatchesImageEngine('moss-style.safetensors','moss'),true)
assert.equal(loraMatchesImageEngine('klein-anime.safetensors','moss'),false)
assert.equal(q.identityStillId,'')
const fresh=validateRequest({mode:'generate',engine:'moss',folderId:'f',promptSections:{action:'cup'},settings:{aspect:'auto'}})
assert.equal(fresh.settings.steps,25)