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.

Solutions

  1. Verify the workflow JSON contains an enabled SaveImage (or equivalent) node whose outputs are returned by the backend.
  2. Confirm the workflow_id/file is an image workflow and matches the media_type='image' call.
  3. 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.
  4. For RunningHub, ensure the output node is published/exposed so the API returns generated image files.
  5. 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

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


AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30). Data as JSON: /api/errors/ec5a189421a554ab. Report an issue: GitHub.

Appendix: 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)