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:
@@ -8,8 +8,9 @@ import ts from 'typescript'
|
||||
|
||||
const stub = `
|
||||
export function filterLoraStackForImageEngine(stack, engine) {
|
||||
if (engine === 'moss') return []
|
||||
return Array.isArray(stack) ? stack : []
|
||||
const items = Array.isArray(stack) ? stack : []
|
||||
if (engine !== 'moss') return items
|
||||
return items.filter(item => /(^|[\\/_.-])moss/i.test(String(item?.name || '')))
|
||||
}
|
||||
export function loraIdentityKey(name) {
|
||||
return String(name || '').replace(/\\\\/g, '/').split('/').pop().toLowerCase()
|
||||
@@ -47,11 +48,14 @@ test('MOSS is a generate engine with its own workflow and sampling defaults', ()
|
||||
assert.deepEqual(api.imageV2SamplingDefaults('krea'), { steps: 8, cfg: 1 })
|
||||
assert.deepEqual(api.imageV2SamplingDefaults('flux'), { steps: 24, cfg: 4 })
|
||||
assert.deepEqual(api.defaultImageV2LoraStack({ engine: 'moss', mode: 'generate', xaigen: true }), [])
|
||||
assert.deepEqual(api.mergeLegacyImageV2Loras([{ name: 'klein.safetensors', strengthModel: 1, strengthClip: 1 }], {
|
||||
assert.deepEqual(api.mergeLegacyImageV2Loras([
|
||||
{ name: 'klein.safetensors', strengthModel: 1, strengthClip: 1 },
|
||||
{ name: 'moss-style.safetensors', strengthModel: 0.8, strengthClip: 0.8 }
|
||||
], {
|
||||
engine: 'moss',
|
||||
mode: 'generate',
|
||||
xaigen: true
|
||||
}), [])
|
||||
}), [{ name: 'moss-style.safetensors', strengthModel: 0.8, strengthClip: 0.8 }])
|
||||
})
|
||||
|
||||
test('MOSS look settings stay separate from Klein and Krea', () => {
|
||||
|
||||
Reference in New Issue
Block a user