Add ACE-Step 1.5 and YuE on Music, and put Video/Image/Music cards back.

Recover finished Comfy audio when queueing hangs so a completed track is not stuck on Queueing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-03 07:42:54 -05:00
co-authored by Cursor
parent ce85e7f513
commit 78b158471b
17 changed files with 951 additions and 110 deletions
+23 -1
View File
@@ -4,7 +4,9 @@ export const MUSIC_DURATION_DEFAULT = 60
export const MUSIC_STEPS_MIN = 8
export const MUSIC_STEPS_MAX = 100
export const MUSIC_STEPS_DEFAULT = 50
export const MUSIC_STEPS_DEFAULT_15 = 8
export const MUSIC_CFG_DEFAULT = 5
export const MUSIC_CFG_DEFAULT_15 = 1
export const MUSIC_LYRICS_STRENGTH_DEFAULT = 0.9
export const MUSIC_TAGS_MAX = 2000
export const MUSIC_LYRICS_MAX = 8000
@@ -31,14 +33,34 @@ export const DEFAULT_MUSIC_LYRICS = `[Verse 1]
[Outro]
`
export type MusicEngine = 'ace-step' | 'ace-step-1.5'
export type MusicEngine = 'ace-step' | 'ace-step-1.5' | 'yue'
export function parseMusicEngine(raw: unknown): MusicEngine {
const value = String(raw || '').trim().toLowerCase()
if (value === 'ace-step-1.5' || value === 'ace15' || value === 'v1.5') return 'ace-step-1.5'
if (value === 'yue' || value === 'yue-s1' || value === 'lyrics2song') return 'yue'
return 'ace-step'
}
export function isAceMusicEngine(engine: MusicEngine | string | undefined) {
return parseMusicEngine(engine) !== 'yue'
}
export function musicEngineLabel(engine: MusicEngine | string | undefined) {
const value = parseMusicEngine(engine)
if (value === 'ace-step-1.5') return 'ACE-Step 1.5'
if (value === 'yue') return 'YuE'
return 'ACE-Step'
}
export function parseMusicBpm(tags: unknown, fallback = 120) {
const match = String(tags || '').match(/(\d{2,3})\s*bpm/i)
if (!match) return fallback
const value = Number(match[1])
if (!Number.isFinite(value)) return fallback
return Math.min(300, Math.max(10, Math.round(value)))
}
export function clampMusicDuration(raw: unknown, fallback = MUSIC_DURATION_DEFAULT) {
const value = Number(raw)
if (!Number.isFinite(value)) return fallback