ATH-MaaS/Pixelle-Video · error · Exception
No image generated
Error message
No image generated
What it means
For media_type 'image', MediaService.__call__ requires at least one entry in result.images after a 'completed' workflow run. If the finished run produced no image outputs, it raises 'No image generated'. Like the video variant, this indicates an output-mapping or workflow-configuration problem rather than a failed execution.
Source
Thrown at pixelle_video/services/media.py:306
video_url = result.videos[0]
logger.info(f"✅ Generated video: {video_url}")
# Try to extract duration from result (if available)
duration = None
if hasattr(result, 'duration') and result.duration:
duration = result.duration
return MediaResult(
media_type="video",
url=video_url,
duration=duration
)
else: # image
# Image workflow - get image from result
if not result.images:
logger.error("No image generated (workflow returned no images)")
raise Exception("No image generated")
image_url = result.images[0]
logger.info(f"✅ Generated image: {image_url}")
return MediaResult(
media_type="image",
url=image_url
)
except Exception as e:
logger.error(f"Media generation error: {e}")
raise
View on GitHub (pinned to 848b054e4f)
Solutions
- Verify the workflow JSON contains an enabled SaveImage (or equivalent) node whose outputs are returned by the backend.
- Confirm the workflow_id/file is an image workflow and matches the media_type='image' call.
- Inspect the raw result (logs of result.__dict__ / result.outputs) to find where the image landed; if stored under files, extract it there or upgrade ComfyKit.
- For RunningHub, ensure the output node is published/exposed so the API returns generated image files.
- Retry once if the backend sometimes omits outputs under load, but treat a persistent empty result as a workflow configuration bug.
Example fix
// before
if not result.images:
raise Exception("No image generated")
// after
images = getattr(result, "images", None) or [f for f in getattr(result, "files", []) or [] if f.endswith((".png", ".jpg", ".jpeg", ".webp"))]
if not images:
raise Exception(f"No image generated; outputs={getattr(result, 'outputs', None)}")
image_url = images[0] Defensive patterns
Strategy: validation
Validate before calling
# pre-flight: ensure the workflow actually produces image output
def workflow_produces_image(workflow_json: dict) -> bool:
nodes = workflow_json.get("nodes", [])
return any(n.get("type") in ("SaveImage", "SaveImageWithAlpha", "PreviewImage")
for n in nodes if not n.get("mode"))
assert media_type == "image" and workflow_produces_image(load_workflow(workflow_key)) Type guard
def has_image_output(result) -> bool:
return bool(getattr(result, "images", None)) Try / catch
try:
media = await media_service(...)
except Exception as e:
if "No image generated" in str(e):
logger.error("workflow completed with no image; check SaveImage node")
raise WorkflowConfigError("image workflow has no active SaveImage node") from e
raise Prevention
- Keep an enabled SaveImage node in every image workflow template.
- Match media_type to the workflow type in configuration.
- Expose output nodes when publishing RunningHub workflows.
- After ComfyKit upgrades, smoke-test each workflow and inspect result.images population.
When it happens
Trigger: kit.execute() returns status 'completed' but result.images is empty/None for media_type='image' — usually the workflow lacks a SaveImage/PreviewImage node, the save node is bypassed, or ComfyKit did not classify outputs as images.
Common situations: Pointing the image pipeline at a video workflow; SaveImage node disabled or 'save_output' toggled off; RunningHub workflow without an exposed image output node; ComfyKit version whose result schema puts images under files instead of images.
Related errors
- No video generated
- No audio file generated by workflow
- 输入图片不存在: {image_path}
- No default workflow configured for {self.service_name}. Plea
- Workflow '{workflow}' not found. Available workflows: {avail
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/ec5a189421a554ab.
Report an issue: GitHub.