{"record":{"id":"8cef5e68cfb0a228","repo":"calesthio/OpenMontage","slug":"execution-error-msgs","errorCode":null,"errorMessage":"Execution error: {msgs}","messagePattern":"Execution error: (.+?)","errorType":"exception","errorClass":"ComfyUIError","httpStatus":null,"severity":"error","filePath":"tools/_comfyui/client.py","lineNumber":234,"sourceCode":"            f\"(local/custom workflows on modest GPUs routinely exceed the \"\n            f\"client wait) — it was not cancelled. Poll \"\n            f\"GET {{server_url}}/history/{prompt_id} directly, or call \"\n            f\"generate()/execute() again with a longer timeout and this \"\n            f\"prompt_id to resume waiting without resubmitting.\",\n            prompt_id=prompt_id,\n        )\n\n    def _history_entry(self, prompt_id: str) -> dict | None:\n        \"\"\"Return a completed history entry, or ``None`` while it is absent.\"\"\"\n        resp = requests.get(f\"{self.server_url}/history/{prompt_id}\", timeout=10)\n        resp.raise_for_status()\n        entry = resp.json().get(prompt_id)\n        if entry is None:\n            return None\n        status = entry.get(\"status\", {})\n        if status.get(\"status_str\") == \"error\":\n            msgs = status.get(\"messages\", [])\n            raise ComfyUIError(f\"Execution error: {msgs}\", prompt_id=prompt_id)\n        return entry\n\n    def _history_entry_if_reachable(self, prompt_id: str) -> dict | None:\n        \"\"\"Best-effort history probe while the websocket remains usable.\"\"\"\n        try:\n            return self._history_entry(prompt_id)\n        except ComfyUIError:\n            raise\n        except Exception:\n            return None\n\n    def wait_ws(\n        self,\n        prompt_id: str,\n        *,\n        timeout: int = 600,\n        interval: int = 5,\n        on_progress: Callable[[dict], None] | None = None,","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/_comfyui/client.py#L216-L252","documentation":"ComfyUIError raised by _history_entry when the history entry for prompt_id exists and its status.status_str equals 'error'. This means execution genuinely started and a node failed server-side (model load error, OOM, bad input tensor, custom node exception). The status.messages list is embedded verbatim and typically contains an execution_error entry with node type, exception message, and traceback.","triggerScenarios":"poll() or any history fetch for a prompt whose workflow failed mid-run: CUDA out of memory, missing model file resolved at execution time, a custom node raising Python exceptions, invalid image dimensions for a sampler.","commonSituations":"VRAM exhaustion with oversized batches/resolutions on consumer GPUs; model files moved after workflow validation; custom node bugs or version incompatibilities with the installed ComfyUI; fp16 instability on some GPUs.","solutions":["Read the embedded messages — the execution_error entry names the failing node type and exception text","For CUDA OOM: lower resolution/batch, use tiled VAE, fp16/lowvram variants, or a smaller checkpoint","For missing models: verify files under models/ match the names the workflow references","For custom-node crashes: update or pin the node, check ComfyUI server console for the full traceback"],"exampleFix":"# before\nworkflow patched with batch_size=8, width=1536, height=1536  # OOM on 8GB GPU\n\n# after\npatches = {\"3\": {\"batch_size\": 1, \"width\": 1024, \"height\": 1024}}\nworkflow = ComfyUIClient.patch_workflow(workflow, patches)","handlingStrategy":"try-catch","validationCode":"import requests\n# before submitting heavy jobs, sanity-check VRAM and model availability\ninfo = requests.get(f\"{server_url}/object_info\", timeout=10).json()\nassert \"CheckpointLoaderSimple\" in info, \"no checkpoint loader available\"","typeGuard":null,"tryCatchPattern":"try:\n    entry = client.poll(prompt_id)\nexcept ComfyUIError as e:\n    if \"Execution error\" in str(e):\n        msgs = e.args[0] if e.args else str(e)\n        # locate execution_error entry: node type + exception message\n        raise SystemExit(f\"comfyui node failed: {msgs}\")\n    raise","preventionTips":["Size resolution/batch to available VRAM; use tiled VAE for large images","Pre-verify model filenames under models/ match workflow references","Pin custom node versions; check server console tracebacks on failure"],"tags":["comfyui","execution-error","gpu","oom"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}