Keep YuE2 jobs live on the bench and wire target length to semantic tokens.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -65,7 +65,7 @@ export default defineEventHandler(async (event) => {
|
||||
const duration = optionalNumber(body.duration)
|
||||
if (duration != null) {
|
||||
if (row.kind === 'music') {
|
||||
if (!Number.isInteger(duration) || duration < 30 || duration > 150) throw createError({ statusCode: 400, statusMessage: 'YuE2 duration must be 30–150 seconds.' })
|
||||
if (!Number.isInteger(duration) || duration < 15 || duration > 150) throw createError({ statusCode: 400, statusMessage: 'YuE2 target length must be 15–150 seconds.' })
|
||||
payload.duration = duration
|
||||
payload.musicEngine = 'yue2'
|
||||
} else payload.duration = Math.min(120, Math.max(0.5, duration))
|
||||
|
||||
Reference in New Issue
Block a user