mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-28 08:09:27 -05:00
fix: a failed ComfyUI run is reported as a successful image generation with no images (#33237)
This commit is contained in:
1 file changed
+7
@@ -87,6 +87,13 @@ async def _ws_get_images(ws, workflow, client_id, base_url, api_key):
|
||||
# binary messages (previews) are silently skipped
|
||||
|
||||
history = (await get_history(prompt_id, base_url, api_key))[prompt_id]
|
||||
status = history.get('status', {})
|
||||
if status.get('status_str') == 'error':
|
||||
error = next((data for kind, data in status.get('messages', []) if kind == 'execution_error'), {})
|
||||
raise Exception(
|
||||
f'ComfyUI {error.get("node_type", "workflow")} failed: {error.get("exception_message", "").strip()}'
|
||||
)
|
||||
|
||||
for node_id in history['outputs']:
|
||||
node_output = history['outputs'][node_id]
|
||||
if node_id in workflow and workflow[node_id].get('class_type') in [
|
||||
|
||||
Reference in new issue
Block a user