Replace Comfy YuE with standalone YuEGP profile 1
This commit is contained in:
+2
-3
@@ -104,9 +104,8 @@ export function countYueLyricSections(lyrics: unknown) {
|
||||
export function yueLyricsProblem(lyrics: unknown): string | null {
|
||||
const text = String(lyrics || '').trim()
|
||||
if (!text) return 'YuE needs lyrics with section tags like [Verse 1] and [Chorus].'
|
||||
if (countYueLyricSections(text) < 1) {
|
||||
return 'YuE lyrics must include at least one [Section] tag (use the chips under Lyrics).'
|
||||
}
|
||||
const sections = [...text.matchAll(/\[([^\]]+)\]\s*([^\[]*)/gs)].filter(match => match[2].trim())
|
||||
if (sections.length !== 1) return 'YuEGP needs exactly one non-empty lyric section. Combine the lyrics under one heading.'
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user