1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-02 23:14:49 +08:00

Highlight nodes with errors in red even when workflow works fine.

This commit is contained in:
comfyanonymous
2023-07-13 02:25:38 -04:00
parent b2f03164c7
commit 876dadca84
3 changed files with 14 additions and 7 deletions

View File

@@ -444,7 +444,8 @@ class PromptServer():
prompt_id = str(uuid.uuid4())
outputs_to_execute = valid[2]
self.prompt_queue.put((number, prompt_id, prompt, extra_data, outputs_to_execute))
return web.json_response({"prompt_id": prompt_id, "number": number})
response = {"prompt_id": prompt_id, "number": number, "node_errors": valid[3]}
return web.json_response(response)
else:
print("invalid prompt:", valid[1])
return web.json_response({"error": valid[1], "node_errors": valid[3]}, status=400)