Fix generation progress getting stuck at 1% after Comfy finishes.
Poll Comfy history and the job snapshot so the browser still gets the video when the live stream is buffered or the websocket misses completion. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -95,9 +95,11 @@ async function runGeneration(
|
||||
length: number
|
||||
}
|
||||
) {
|
||||
const done = watchComfyJob(job)
|
||||
job.status = 'uploading'
|
||||
const uploaded = await uploadImage(params.image)
|
||||
emitJob(job, { type: 'status', message: 'Queueing MiniMax H3 job...', progress: 6 })
|
||||
await waitForComfySocket(job, 4000)
|
||||
|
||||
const graph = buildWorkflow({
|
||||
prompt: params.prompt,
|
||||
@@ -114,5 +116,5 @@ async function runGeneration(
|
||||
job.promptId = queued.prompt_id
|
||||
job.status = 'running'
|
||||
emitJob(job, { type: 'status', message: 'Job queued on ComfyUI', progress: 8 })
|
||||
await watchComfyJob(job)
|
||||
await done
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user