Make Studio 2 the home bench with YuE2 music, LTX, and per-preview hide.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -50,10 +50,6 @@ export default defineEventHandler(async (event) => {
|
||||
payload.prompt = text(body.tags, 2000)
|
||||
row.prompt = payload.prompt
|
||||
}
|
||||
if (body.yueProfile != null && row.kind === 'music' && payload.musicEngine === 'yue') {
|
||||
if (body.yueProfile !== 1 && body.yueProfile !== 3) throw createError({ statusCode: 400, statusMessage: 'Choose YuEGP profile 1 or 3.' })
|
||||
payload.yueProfile = body.yueProfile
|
||||
}
|
||||
if (body.lyrics != null) payload.lyrics = text(body.lyrics)
|
||||
const instrumental = optionalBool(body.instrumental)
|
||||
if (instrumental != null) payload.instrumental = instrumental
|
||||
@@ -63,8 +59,8 @@ export default defineEventHandler(async (event) => {
|
||||
if (body.negative != null) payload.negative = text(body.negative, 2000)
|
||||
const duration = optionalNumber(body.duration)
|
||||
if (duration != null) {
|
||||
if (row.kind === 'music' && payload.musicEngine === 'yue') {
|
||||
if (!Number.isInteger(duration) || duration < 30 || duration > 150) throw createError({ statusCode: 400, statusMessage: 'YuEGP duration must be 30–150 seconds.' })
|
||||
if (row.kind === 'music') {
|
||||
if (!Number.isInteger(duration) || duration < 30 || duration > 150) throw createError({ statusCode: 400, statusMessage: 'YuE2 duration must be 30–150 seconds.' })
|
||||
payload.duration = duration
|
||||
} else payload.duration = Math.min(120, Math.max(0.5, duration))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user