invoke-ai/InvokeAI · error · ExternalProviderRequestError
Seedream response contained no images
Error message
Seedream response contained no images
What it means
Raised when a Seedream generation response contained a valid "data" list but produced no usable images and no per-item error objects were collected — i.e. the list was empty or its entries were silently skipped (non-dict items). It means the provider succeeded at the HTTP level but returned nothing usable.
Source
Thrown at invokeai/app/services/external_generation/providers/seedream.py:146
error_payload = item["error"]
item_errors.append(
error_payload if isinstance(error_payload, dict) else {"message": str(error_payload)}
)
continue
encoded = item.get("b64_json")
if not encoded:
continue
image = decode_image_base64(encoded)
generated_images.append(ExternalGeneratedImage(image=image, seed=request.seed))
if not generated_images:
if item_errors:
first = item_errors[0]
message = first.get("message") if isinstance(first, dict) else None
raise ExternalProviderRequestError(
f"Seedream returned no images. Provider reported: {message or item_errors}"
)
raise ExternalProviderRequestError("Seedream response contained no images")
provider_metadata: dict[str, object] = {"model": model_id}
if item_errors:
provider_metadata["partial_failures"] = item_errors
self._logger.warning(
"Seedream returned %d image(s) with %d partial failure(s): %s",
len(generated_images),
len(item_errors),
item_errors,
)
return ExternalGenerationResult(
images=generated_images,
seed_used=request.seed,
provider_metadata=provider_metadata,
)
View on GitHub (pinned to 0b6a024f2f)
Solutions
- Log the raw response body to see whether "data" was empty or held unexpected item shapes
- Retry the generation request — empty payloads are often transient provider-side issues
- Update the provider client if the Seedream API changed its item structure so items are no longer plain dicts
- Contact the provider / check status page if empty responses persist
Defensive patterns
Strategy: retry
Type guard
def has_images(data_items: object) -> bool:
return isinstance(data_items, list) and any(isinstance(i, dict) for i in data_items) Try / catch
for attempt in range(3):
try:
return provider.generate(request)
except ExternalProviderRequestError as e:
if "no images" in str(e) and attempt < 2:
time.sleep(2 ** attempt)
continue
raise Prevention
- Retry transient empty responses with exponential backoff
- Log the full response body when data is empty to diagnose provider-side soft failures
- Monitor provider status pages and disable the route during known incidents
When it happens
Trigger: generate() called when the response "data" array is an empty list, or contains only non-dict entries that are skipped by the `isinstance(item, dict)` guard, with no item errors recorded.
Common situations: Provider intermittently returning empty payloads; unusual model versions that return empty data on soft failures; parsing assumptions broken by an API change that alters item structure (items no longer dicts).
Related errors
- Seedream response payload missing image data
- Seedream returned no images. Provider reported: {message or
- Mode '{request.mode}' requires an init image for {request.mo
- DashScope async response missing task_id: {data}
- DashScope response missing output: {data}
AI-assisted analysis of invoke-ai/InvokeAI@0b6a024f2f (2026-08-29).
Data as JSON: /api/errors/1d15cc4fee5440f2.
Report an issue: GitHub.