ATH-MaaS/Pixelle-Video · error · Exception

No video generated

Error message

No video generated

What it means

After a workflow run reports status 'completed', MediaService.__call__ expects at least one entry in result.videos for media_type == 'video'. If the completed run produced no video outputs, it raises 'No video generated'. This means the workflow succeeded but its outputs did not include a video node, or the outputs were not mapped into result.videos by ComfyKit.

Source

Thrown at pixelle_video/services/media.py:287

            else:
                # Selfhost: pass file path (ComfyKit will use local ComfyUI)
                workflow_input = workflow_info["path"]
                logger.info(f"Executing selfhost workflow: {workflow_input}")
            
            result = await kit.execute(workflow_input, workflow_params)
            
            # 5. Handle result based on specified media_type
            if result.status != "completed":
                error_msg = result.msg or "Unknown error"
                logger.error(f"Media generation failed: {error_msg}")
                raise Exception(f"Media generation failed: {error_msg}")
            
            # Extract media based on specified type
            if media_type == "video":
                # Video workflow - get video from result
                if not result.videos:
                    logger.error("No video generated (workflow returned no videos)")
                    raise Exception("No video generated")
                
                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)")

View on GitHub (pinned to 848b054e4f)

Solutions

  1. Inspect the workflow: ensure it contains an active video output node (e.g. VHS_VideoCombine with a video format) and that its output is registered/saved.
  2. Confirm the workflow_id/file actually matches media_type — a common mistake is pointing the video pipeline at an image workflow.
  3. Check the ComfyKit result object in debug logs (result.__dict__/files) to see where the output landed; if it's in files/outputs rather than videos, upgrade ComfyKit or adjust the output node.
  4. If using RunningHub, verify the workflow's output node is exposed so the API returns the generated video file.
  5. Add a fallback that logs all result outputs before raising so mismatches between output type and result.videos are diagnosable.

Example fix

// before
if not result.videos:
    raise Exception("No video generated")
// after
videos = getattr(result, "videos", None) or [f for f in getattr(result, "files", []) or [] if f.endswith((".mp4", ".webm", ".mov"))]
if not videos:
    raise Exception(f"No video generated; outputs={getattr(result, 'outputs', None)}")
video_url = videos[0]
Defensive patterns

Strategy: validation

Validate before calling

# pre-flight: ensure the workflow actually produces video output
def workflow_produces_video(workflow_json: dict) -> bool:
    nodes = workflow_json.get("nodes", [])
    return any("VideoCombine" in (n.get("type", "")) or "SaveVideo" in (n.get("type", ""))
               for n in nodes if not n.get("mode"))  # mode != 4/2 means enabled
# and confirm media_type matches the configured workflow:
assert media_type == "video" and workflow_produces_video(load_workflow(workflow_key))

Type guard

def has_video_output(result) -> bool:
    return bool(getattr(result, "videos", None))

Try / catch

try:
    media = await media_service(...)
except Exception as e:
    if "No video generated" in str(e):
        logger.error("workflow completed with no video; check output node config: %s", getattr(e, 'outputs', None))
        raise WorkflowConfigError("video workflow has no active video output node") from e
    raise

Prevention

When it happens

Trigger: kit.execute() returns status 'completed' but result.videos is empty/None while media_type == 'video' — typically because the workflow's save/output node saves images (e.g. VHS_VideoCombine misconfigured to output frames), the video output node is muted/bypassed, or ComfyKit failed to classify the output as a video.

Common situations: Using an image-generation workflow JSON with media_type='video'; Video Combine node configured with format that yields images or with save_output disabled; RunningHub workflow outputs not declared so the platform returns no video files; ComfyKit version that doesn't parse the output node type into result.videos.

Related errors


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