From 9786988690cfb9c6908e2a36ab24aa19f0ca39b5 Mon Sep 17 00:00:00 2001 From: krustophski Date: Thu, 30 Jul 2026 08:22:54 +0300 Subject: [PATCH] Fix ComfyUI prompt queueing: always generate server-side UUID for prompt_id ComfyUI's /prompt endpoint now validates prompt_id as a UUID. This app's queueComfyPrompt() trusted a client-supplied identifiers.promptId (used as a correlation id for progress polling), which is not guaranteed to be a UUID, causing every queued workflow to fail with "prompt_id must be a valid UUID" and no way to retry successfully. The correlation id used for progress streaming (executionPromptId) is independent of what's actually sent to ComfyUI in the request body, so this is safe to always regenerate. Found and verified 2026-07-30 while getting 3DGenStudio's bundled mesh-gen workflows working against a fresh ComfyUI instance. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.js b/server.js index 0137163..6a717c4 100644 --- a/server.js +++ b/server.js @@ -1481,7 +1481,7 @@ async function sleep(ms) { async function queueComfyPrompt(baseUrl, workflowJson, identifiers = {}) { const clientId = String(identifiers?.clientId || '').trim() || randomUUID(); - const promptId = String(identifiers?.promptId || '').trim() || randomUUID(); + const promptId = randomUUID(); // patched 2026-07-30: ComfyUI now enforces UUID prompt_id, client-supplied ids can be non-UUID and get rejected const response = await fetch(`${baseUrl}/prompt`, { method: 'POST', headers: {