{"record":{"id":"ec5a189421a554ab","repo":"ATH-MaaS/Pixelle-Video","slug":"no-image-generated","errorCode":null,"errorMessage":"No image generated","messagePattern":"No image generated","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"pixelle_video/services/media.py","lineNumber":306,"sourceCode":"                \n                video_url = result.videos[0]\n                logger.info(f\"✅ Generated video: {video_url}\")\n                \n                # Try to extract duration from result (if available)\n                duration = None\n                if hasattr(result, 'duration') and result.duration:\n                    duration = result.duration\n                \n                return MediaResult(\n                    media_type=\"video\",\n                    url=video_url,\n                    duration=duration\n                )\n            else:  # image\n                # Image workflow - get image from result\n                if not result.images:\n                    logger.error(\"No image generated (workflow returned no images)\")\n                    raise Exception(\"No image generated\")\n                \n                image_url = result.images[0]\n                logger.info(f\"✅ Generated image: {image_url}\")\n                \n                return MediaResult(\n                    media_type=\"image\",\n                    url=image_url\n                )\n        \n        except Exception as e:\n            logger.error(f\"Media generation error: {e}\")\n            raise\n","sourceCodeStart":288,"sourceCodeEnd":319,"githubUrl":"https://github.com/ATH-MaaS/Pixelle-Video/blob/848b054e4fae40dabc62ec58e960b573e83793ac/pixelle_video/services/media.py#L288-L319","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nif not result.images:\n    raise Exception(\"No image generated\")\n// after\nimages = getattr(result, \"images\", None) or [f for f in getattr(result, \"files\", []) or [] if f.endswith((\".png\", \".jpg\", \".jpeg\", \".webp\"))]\nif not images:\n    raise Exception(f\"No image generated; outputs={getattr(result, 'outputs', None)}\")\nimage_url = images[0]","handlingStrategy":"validation","validationCode":"# pre-flight: ensure the workflow actually produces image output\ndef workflow_produces_image(workflow_json: dict) -> bool:\n    nodes = workflow_json.get(\"nodes\", [])\n    return any(n.get(\"type\") in (\"SaveImage\", \"SaveImageWithAlpha\", \"PreviewImage\")\n               for n in nodes if not n.get(\"mode\"))\nassert media_type == \"image\" and workflow_produces_image(load_workflow(workflow_key))","typeGuard":"def has_image_output(result) -> bool:\n    return bool(getattr(result, \"images\", None))","tryCatchPattern":"try:\n    media = await media_service(...)\nexcept Exception as e:\n    if \"No image generated\" in str(e):\n        logger.error(\"workflow completed with no image; check SaveImage node\")\n        raise WorkflowConfigError(\"image workflow has no active SaveImage node\") from e\n    raise","preventionTips":["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."],"tags":["workflow-output","comfyui","image","missing-output"],"backgroundTag":"empty-workflow-output","analyzedSha":"848b054e4fae40dabc62ec58e960b573e83793ac","analyzedAt":"2026-08-30T03:24:41.468Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}