ATH-MaaS/Pixelle-Video · error · Exception
Image analysis failed: {error_msg}
Error message
Image analysis failed: {error_msg} What it means
After the analysis workflow executes via kit.execute(), the service checks result.status and raises a generic Exception if it is not "completed". The workflow runner (ComfyUI selfhost or RunningHub) reported a failure, and the underlying result.msg (e.g. node error, OOM, timeout) is embedded in the message.
Source
Thrown at pixelle_video/services/image_analysis.py:155
kit = await self.core._get_or_create_comfykit()
# Determine what to pass to ComfyKit based on source
if workflow_info["source"] == "runninghub" and "workflow_id" in workflow_info:
# RunningHub: pass workflow_id
workflow_input = workflow_info["workflow_id"]
logger.info(f"Executing RunningHub workflow: {workflow_input}")
else:
# Selfhost: pass file path
workflow_input = workflow_info["path"]
logger.info(f"Executing selfhost workflow: {workflow_input}")
result = await kit.execute(workflow_input, workflow_params)
# 5. Extract description from result
if result.status != "completed":
error_msg = result.msg or "Unknown error"
logger.error(f"Image analysis failed: {error_msg}")
raise Exception(f"Image analysis failed: {error_msg}")
# Extract text description from result (format varies by source)
description = None
# Try format 1: Selfhost outputs (direct text in outputs)
# Format: {'6': {'text': ['description text']}}
if result.outputs:
for node_id, node_output in result.outputs.items():
if 'text' in node_output:
text_list = node_output['text']
if text_list and len(text_list) > 0:
description = text_list[0]
break
# Try format 2: RunningHub raw_data (text file URL)
# Format: {'raw_data': [{'fileUrl': 'https://...txt', 'fileType': 'txt', ...}]}
if not description and result.outputs and 'raw_data' in result.outputs:
raw_data = result.outputs['raw_data']View on GitHub (pinned to 848b054e4f)
Solutions
- Read the embedded error_msg in the exception to identify which workflow node failed
- Check the ComfyUI/RunningHub server logs for the actual node error (missing model, OOM, bad node)
- Verify the workflow (resolve_workflow_path for the source) is valid for the target backend
- Retry once if the failure was transient (server busy/timeout), then fail
Example fix
try:
desc = await analyzer(image_path=img, source="selfhost")
except Exception as e:
logger.warning(f"analysis failed ({e}); retrying once")
desc = await analyzer(image_path=img, source="selfhost") Defensive patterns
Strategy: try-catch
Validate before calling
wf = resolve_workflow_path("analyse_image", source)
if not Path(wf).exists() and source == "selfhost":
raise FileNotFoundError(f"workflow missing: {wf}") Type guard
def workflow_succeeded(result) -> bool:
return getattr(result, "status", None) == "completed" and bool(getattr(result, "outputs", None)) Try / catch
for attempt in range(2):
try:
return await analyzer(image_path=img, source=src)
except Exception as e:
if attempt == 1 or "timeout" not in str(e).lower():
raise
await asyncio.sleep(5) Prevention
- Check backend server health (ComfyUI queue/GPU memory) before batch runs
- Keep workflow JSONs in sync with installed custom nodes on the server
- Validate RunningHub workflow_id and API credits before long pipelines
- Log result.msg on failure — it names the failing node
When it happens
Trigger: kit.execute(workflow_input, workflow_params) returns a result whose status is "failed"/"error" — the remote ComfyUI workflow errored on a node, the RunningHub workflow_id run failed, prompts failed validation, or the execution timed out.
Common situations: ComfyUI server overloaded or GPU OOM; workflow file incompatible with installed custom nodes; invalid RunningHub workflow_id or API credit exhaustion; model checkpoint referenced by the workflow missing on the server.
Related errors
- No default workflow configured for {self.service_name}. Plea
- Workflow '{workflow}' not found. Available workflows: {avail
- No description generated
- Media generation failed: {error_msg}
- TTS generation failed: {error_msg}
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/270e3a4319c5f1db.
Report an issue: GitHub.