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:
Towsty
2026-09-15 20:53:07 -05:00
co-authored by Cursor
parent 2ebc3066e6
commit 5694104226
13 changed files with 92 additions and 29 deletions
+12 -8
View File
@@ -298,11 +298,12 @@ export function trackSettingsRows(track: {
lyricsStrength?: number
}) {
const rows: SettingsRow[] = []
const engine = String(track.engine || '')
const isYue2 = engine === 'yue2' || engine === 'yue-2'
if (track.engine) {
const engine = String(track.engine)
rows.push({
label: 'Engine',
value: engine === 'yue2' || engine === 'yue-2'
value: isYue2
? 'YuE2'
: engine === 'ace-step-1.5'
? 'ACE-Step 1.5 (legacy)'
@@ -318,14 +319,17 @@ export function trackSettingsRows(track: {
else if (track.lyrics?.trim()) rows.push({ label: 'Lyrics', value: track.lyrics.trim() })
if (typeof track.duration === 'number' && track.duration > 0) {
const rounded = Math.round(track.duration * 10) / 10
rows.push({ label: 'Duration', value: Number.isInteger(rounded) ? `${rounded}s` : `${rounded.toFixed(1)}s` })
rows.push({
label: isYue2 ? 'Length' : 'Duration',
value: Number.isInteger(rounded) ? `${rounded}s` : `${rounded.toFixed(1)}s`
})
}
if (track.yueProfile != null) rows.push({ label: 'YuEGP profile', value: String(track.yueProfile) })
if (track.yueProfile == null && track.steps != null) rows.push({ label: 'Steps', value: String(track.steps) })
if (track.yueProfile == null && track.cfg != null) rows.push({ label: 'CFG', value: formatNum(track.cfg) })
if (track.samplerName) rows.push({ label: 'Sampler', value: track.samplerName })
if (track.scheduler) rows.push({ label: 'Scheduler', value: track.scheduler })
if (track.lyricsStrength != null) rows.push({ label: 'Lyric strength', value: formatNum(track.lyricsStrength) })
if (!isYue2 && track.yueProfile == null && track.steps != null) rows.push({ label: 'Steps', value: String(track.steps) })
if (!isYue2 && track.yueProfile == null && track.cfg != null) rows.push({ label: 'CFG', value: formatNum(track.cfg) })
if (!isYue2 && track.samplerName) rows.push({ label: 'Sampler', value: track.samplerName })
if (!isYue2 && track.scheduler) rows.push({ label: 'Scheduler', value: track.scheduler })
if (!isYue2 && track.lyricsStrength != null) rows.push({ label: 'Lyric strength', value: formatNum(track.lyricsStrength) })
if (track.seed != null) rows.push({ label: 'Seed', value: String(track.seed) })
return rows
}
+8 -1
View File
@@ -1,6 +1,13 @@
export const MUSIC_DURATION_MIN = 30
export const MUSIC_DURATION_MIN = 15
export const MUSIC_DURATION_MAX = 150
export const MUSIC_DURATION_DEFAULT = 60
/** YuE2 VAE downsampling: 48000 / 1920 = 25 semantic tokens per second of audio. */
export const YUE2_TOKENS_PER_SECOND = 25
export function yue2MaxTokens(durationSec: number) {
const seconds = clampMusicDuration(durationSec)
return Math.max(200, Math.min(9000, seconds * YUE2_TOKENS_PER_SECOND))
}
export const MUSIC_STEPS_MIN = 8
export const MUSIC_STEPS_MAX = 100
export const MUSIC_STEPS_DEFAULT = 50