Add MOSS-Image on the Image v2 path and stop the queue calling it Klein.

The bench queue labeled every engine except Krea, Qwen, MiniMax, and LTX as Klein, and the v2 starter treated any engine other than Krea as Flux.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-10-22 20:04:58 -05:00
co-authored by Cursor
parent 74edeabc39
commit 354f475866
30 changed files with 873 additions and 111 deletions
+11 -5
View File
@@ -261,19 +261,23 @@ export function imageLoraEngineOf(name: string): 'flux' | 'krea' | null {
return null
}
export function loraMatchesImageEngine(name: string, engine: 'flux' | 'krea') {
export function loraMatchesImageEngine(name: string, engine: 'flux' | 'krea' | 'moss') {
if (engine === 'moss') return false
return imageLoraEngineOf(name) === engine
}
export function filterLorasForImageEngine(names: string[], engine: 'flux' | 'krea') {
export function filterLorasForImageEngine(names: string[], engine: 'flux' | 'krea' | 'moss') {
if (engine === 'moss') return []
return names.filter(name => loraMatchesImageEngine(name, engine))
}
export function filterLoraStackForImageEngine(stack: unknown, engine: 'flux' | 'krea') {
export function filterLoraStackForImageEngine(stack: unknown, engine: 'flux' | 'krea' | 'moss') {
if (engine === 'moss') return []
return normalizeLoraStack(stack).filter(item => loraMatchesImageEngine(item.name, engine))
}
export function imageLoraEngineMismatchMessage(name: string, engine: 'flux' | 'krea') {
export function imageLoraEngineMismatchMessage(name: string, engine: 'flux' | 'krea' | 'moss') {
if (engine === 'moss') return `${loraDisplayName(name)} cannot be used with MOSS-Image.`
const other = engine === 'krea' ? 'Flux' : 'Krea'
const current = engine === 'krea' ? 'Krea' : 'Flux'
return `${loraDisplayName(name)} is a ${other} LoRA and cannot be used with ${current}.`
@@ -283,7 +287,7 @@ export function kleinLoraOnKreaMessage(name: string) {
return imageLoraEngineMismatchMessage(name, 'krea')
}
export type LoraUse = 'minimax' | 'ltx' | 'flux' | 'krea' | 'qwen21'
export type LoraUse = 'minimax' | 'ltx' | 'flux' | 'krea' | 'qwen21' | 'moss'
export function isSystemGraphLora(name: string) {
const id = loraIdentityKey(name)
@@ -313,12 +317,14 @@ export function isQwenImageLora(name: string) {
export function loraMatchesUse(name: string, use: LoraUse) {
if (isSystemGraphLora(name)) return false
if (use === 'moss') return false
if (use === 'qwen21') return isQwenImageLora(name)
return !!inferLoraUse(name)?.includes(use)
}
/** Saved stacks may contain unlabelled adapters; never carry a known wrong engine. */
export function filterLoraStackForUse(stack: unknown, use: LoraUse, xaigen: boolean) {
if (use === 'moss') return []
if (use === 'ltx' && !xaigen) return []
return filterLoraStackForStudio(stack, xaigen).filter(item => {
if (isSystemGraphLora(item.name)) return false