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:
@@ -15,6 +15,8 @@ import {
|
||||
IMAGE_V2_KREA_COMPOSE_DENOISE,
|
||||
IMAGE_V2_KREA_EDIT_DENOISE,
|
||||
IMAGE_V2_KREA_STEPS,
|
||||
IMAGE_V2_MOSS_CFG,
|
||||
IMAGE_V2_MOSS_STEPS,
|
||||
IMAGE_V2_DENOISE_DEFAULT,
|
||||
clampImageV2Denoise,
|
||||
clampImageV2Size,
|
||||
@@ -226,13 +228,23 @@ export default defineEventHandler(async (event) => {
|
||||
const hideThumbnail = parseBool(fields.hideThumbnail)
|
||||
const requestedEngine = parseImageV2Engine(fields.engine, 'flux')
|
||||
const engine = requestedEngine
|
||||
const turbo = parseBool(fields.turbo)
|
||||
if (engine === 'moss' && graphMode !== 'generate') {
|
||||
throw createError({
|
||||
statusCode: 400,
|
||||
statusMessage: 'MOSS-Image is text-to-image only. Use Generate, or Klein or Krea for edits.'
|
||||
})
|
||||
}
|
||||
const turbo = engine === 'moss' ? false : parseBool(fields.turbo)
|
||||
const steps = engine === 'krea'
|
||||
? clampImageSteps(fields.steps, IMAGE_V2_KREA_STEPS)
|
||||
: turbo ? IMAGE_V2_TURBO_STEPS : clampImageSteps(fields.steps, IMAGE_V2_STEPS_DEFAULT)
|
||||
: engine === 'moss'
|
||||
? clampImageSteps(fields.steps, IMAGE_V2_MOSS_STEPS)
|
||||
: turbo ? IMAGE_V2_TURBO_STEPS : clampImageSteps(fields.steps, IMAGE_V2_STEPS_DEFAULT)
|
||||
const cfg = engine === 'krea'
|
||||
? clampImageCfg(fields.cfg, IMAGE_V2_KREA_CFG)
|
||||
: turbo ? IMAGE_V2_TURBO_CFG : clampImageCfg(fields.cfg, IMAGE_V2_CFG_DEFAULT)
|
||||
: engine === 'moss'
|
||||
? clampImageCfg(fields.cfg, IMAGE_V2_MOSS_CFG)
|
||||
: turbo ? IMAGE_V2_TURBO_CFG : clampImageCfg(fields.cfg, IMAGE_V2_CFG_DEFAULT)
|
||||
const megapixels = graphMode === 'generate'
|
||||
? 0
|
||||
: fields.scaleToTotalPixels == null
|
||||
|
||||
Reference in New Issue
Block a user