calesthio/OpenMontage · error · ComfyUIError
Execution error: {msgs}
Error message
Execution error: {msgs} What it means
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.
Source
Thrown at tools/_comfyui/client.py:234
f"(local/custom workflows on modest GPUs routinely exceed the "
f"client wait) — it was not cancelled. Poll "
f"GET {{server_url}}/history/{prompt_id} directly, or call "
f"generate()/execute() again with a longer timeout and this "
f"prompt_id to resume waiting without resubmitting.",
prompt_id=prompt_id,
)
def _history_entry(self, prompt_id: str) -> dict | None:
"""Return a completed history entry, or ``None`` while it is absent."""
resp = requests.get(f"{self.server_url}/history/{prompt_id}", timeout=10)
resp.raise_for_status()
entry = resp.json().get(prompt_id)
if entry is None:
return None
status = entry.get("status", {})
if status.get("status_str") == "error":
msgs = status.get("messages", [])
raise ComfyUIError(f"Execution error: {msgs}", prompt_id=prompt_id)
return entry
def _history_entry_if_reachable(self, prompt_id: str) -> dict | None:
"""Best-effort history probe while the websocket remains usable."""
try:
return self._history_entry(prompt_id)
except ComfyUIError:
raise
except Exception:
return None
def wait_ws(
self,
prompt_id: str,
*,
timeout: int = 600,
interval: int = 5,
on_progress: Callable[[dict], None] | None = None,View on GitHub (pinned to 95e1c3d0ab)
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
Example fix
# before
workflow patched with batch_size=8, width=1536, height=1536 # OOM on 8GB GPU
# after
patches = {"3": {"batch_size": 1, "width": 1024, "height": 1024}}
workflow = ComfyUIClient.patch_workflow(workflow, patches) Defensive patterns
Strategy: try-catch
Validate before calling
import requests
# before submitting heavy jobs, sanity-check VRAM and model availability
info = requests.get(f"{server_url}/object_info", timeout=10).json()
assert "CheckpointLoaderSimple" in info, "no checkpoint loader available" Try / catch
try:
entry = client.poll(prompt_id)
except ComfyUIError as e:
if "Execution error" in str(e):
msgs = e.args[0] if e.args else str(e)
# locate execution_error entry: node type + exception message
raise SystemExit(f"comfyui node failed: {msgs}")
raise Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Prompt {prompt_id} did not complete within {timeout}s. The j
- Execution error: {data}
- Node errors: {json.dumps(data['node_errors'])}
- Prompt error: {json.dumps(data['error'])}
- No prompt_id in response: {data}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/8cef5e68cfb0a228.
Report an issue: GitHub.