Tighten YuE for 16GB VRAM and stop the false Waiting status.
Cap Stage-A segments and use a heavier mmgp profile so long lyrics stop OOMing mid-run, and show that Comfy is actually working. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -32,8 +32,8 @@ function sleep(ms: number) {
|
||||
|
||||
function classifyError(message: string) {
|
||||
const lower = message.toLowerCase()
|
||||
if (lower.includes('out of memory') || (lower.includes('cuda') && lower.includes('alloc')) || lower.includes('vram')) {
|
||||
return 'ComfyUI VRAM allocation failed. Try fewer steps or a shorter duration.'
|
||||
if (lower.includes('out of memory') || lower.includes('exceed allowed memory') || (lower.includes('cuda') && lower.includes('alloc')) || lower.includes('vram')) {
|
||||
return 'ComfyUI ran out of VRAM. For YuE use shorter lyrics (fewer sections) or ACE-Step instead.'
|
||||
}
|
||||
if (lower.includes('econnrefused') || lower.includes('unreachable') || lower.includes('fetch failed')) {
|
||||
return 'ComfyUI host connection dropped. Confirm the desktop instance is running.'
|
||||
@@ -245,11 +245,18 @@ function watchMusicJob(job: Job): Promise<void> {
|
||||
return
|
||||
}
|
||||
const entry = (job.promptId ? history?.[job.promptId] : undefined) as {
|
||||
status?: { status_str?: string; completed?: boolean }
|
||||
status?: {
|
||||
status_str?: string
|
||||
completed?: boolean
|
||||
messages?: Array<[string, Record<string, unknown>]>
|
||||
}
|
||||
} | undefined
|
||||
const status = entry?.status?.status_str
|
||||
if (status === 'error') await fail('ComfyUI reported an execution error')
|
||||
else if (status === 'interrupted') await fail('Job interrupted.')
|
||||
if (status === 'error') {
|
||||
const err = entry?.status?.messages?.find(([type]) => type === 'execution_error')?.[1]
|
||||
const detail = String(err?.exception_message || err?.message || '').trim()
|
||||
await fail(detail || 'ComfyUI reported an execution error')
|
||||
} else if (status === 'interrupted') await fail('Job interrupted.')
|
||||
} catch {
|
||||
// history can miss while the graph is still running
|
||||
}
|
||||
@@ -382,14 +389,19 @@ export async function startMusicJob(params: MusicJobParams) {
|
||||
try {
|
||||
const queued = await queuePrompt(graph, job.clientId, { timeoutMs: 25_000 })
|
||||
if (queued?.prompt_id) job.promptId = queued.prompt_id
|
||||
emitJob(job, { type: 'status', message: 'Job queued on ComfyUI', progress: 8 })
|
||||
const runningMessage = params.engine === 'yue'
|
||||
? 'YuE Stage A on Comfy — 16GB job, often 10–20+ minutes. Leave it alone.'
|
||||
: 'Job queued on ComfyUI'
|
||||
emitJob(job, { type: 'status', message: runningMessage, progress: 8 })
|
||||
} catch (queueError: unknown) {
|
||||
const statusCode = Number((queueError as { statusCode?: number; status?: number })?.statusCode
|
||||
|| (queueError as { status?: number })?.status || 0)
|
||||
if (statusCode >= 400) throw queueError
|
||||
emitJob(job, {
|
||||
type: 'status',
|
||||
message: 'Waiting for ComfyUI to pick up the job...',
|
||||
message: params.engine === 'yue'
|
||||
? 'YuE submitted — waiting for Comfy to start Stage A…'
|
||||
: 'Waiting for ComfyUI to pick up the job...',
|
||||
progress: 8
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user