calesthio/OpenMontage · error · RuntimeError
Seedream task {status}: {error_msg}
Error message
Seedream task {status}: {error_msg} What it means
Raised when the polled Seedream queue task reports status 'FAILED' or 'CANCELLED'. The message embeds the status and the API-supplied 'error' field (defaulting to 'Unknown error' when absent). This is the server-side generation actually failing — moderation rejection, invalid parameters, or upstream model error.
Source
Thrown at tools/graphics/seedream_image.py:216
f"https://queue.fal.run/bytedance/seedream/requests/"
f"{request_id}/status"
)
elapsed = 0.0
while elapsed < 300:
status_resp = requests.get(
status_url,
headers=headers,
timeout=30,
)
status_resp.raise_for_status()
status_data = status_resp.json()
status = status_data.get("status")
if status == "COMPLETED":
break
elif status in ("FAILED", "CANCELLED"):
error_msg = status_data.get("error", "Unknown error")
raise RuntimeError(f"Seedream task {status}: {error_msg}")
time.sleep(10)
elapsed += 10
if elapsed >= 300:
raise RuntimeError(
f"Seedream task timed out after {300}s"
)
result_resp = requests.get(
f"https://queue.fal.run/bytedance/seedream/requests/"
f"{request_id}",
headers=headers,
timeout=30,
)
result_resp.raise_for_status()
result_data = result_resp.json()
View on GitHub (pinned to 95e1c3d0ab)
Solutions
- Read the embedded error message — moderation vs internal error have different fixes
- For moderation: soften or rephrase the prompt, or swap the reference image
- For transient upstream errors: retry the same inputs once or twice
- For 'CANCELLED': check whether another process/dashboard cancelled the request
Defensive patterns
Strategy: retry
Validate before calling
null
Try / catch
try:
paths = seedream_run(inputs)
except RuntimeError as e:
msg = str(e)
if "FAILED" in msg or "CANCELLED" in msg:
if "moderation" in msg.lower():
inputs = soften_prompt(inputs) # rephrase and resubmit
else:
retry_with_backoff(seedream_run, inputs, attempts=2) # transient upstream
else:
raise Prevention
- Read the embedded error field before deciding retry vs rephrase
- Keep prompts clear of moderation-sensitive terms for bulk jobs
- Treat repeated identical FAILED errors as permanent; don't loop
When it happens
Trigger: Prompt or reference image tripped content moderation; image reference URL unreachable by the backend; internal Seedream model error during render; task manually cancelled in the fal dashboard.
Common situations: borderline NSFW or celebrity-likeness prompts; expired/signed reference URLs passed after their TTL; occasional upstream capacity errors that look like permanent failures.
Related errors
- Seedream submit succeeded but did not return request_id
- Seedream task timed out after {300}s
- Seedream completed but no images returned
- duration_seconds is required for cost estimation
- model_id must be one of: {choices}
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/589bdde7d0ba1532.
Report an issue: GitHub.