Comfy-Org/ComfyUI · error · RuntimeError

Kling 3.0 Turbo task finished without a video output: {respo

Error message

Kling 3.0 Turbo task finished without a video output: {response.model_dump()}

What it means

Raised when a Kling 3.0 Turbo task reaches a finished state but its /tasks result contains no output entry with type == 'video' and a non-empty url. The job technically completed but produced no downloadable video, which the node treats as a hard failure instead of returning garbage.

Source

Thrown at comfy_api_nodes/nodes_kling.py:2216

            response_model=TaskStatusResponse,
            status_extractor=lambda r: (r.data.task_status if r.data else None),
        )
        return IO.NodeOutput(await download_url_to_video_output(final_response.data.task_result.videos[0].url))


def build_turbo_shot_prompt(multi_prompt: list[MultiPromptEntry]) -> str:
    """Render storyboard entries into the Turbo multi-shot prompt 'shot n, m, words; ...'."""
    return "; ".join(f"shot {i}, {int(e.duration)}, {e.prompt}" for i, e in enumerate(multi_prompt, 1)) + ";"


def _turbo_video_url(response: Kling3TurboQueryResponse) -> str:
    """Extract the result video URL from a /tasks response (data[].outputs[] where type == 'video')."""
    task = response.data[0] if response.data else None
    if task and task.outputs:
        for output in task.outputs:
            if output.type == "video" and output.url:
                return output.url
    raise RuntimeError(f"Kling 3.0 Turbo task finished without a video output: {response.model_dump()}")


async def execute_kling_turbo(
    cls: type[IO.ComfyNode],
    *,
    prompt: str,
    resolution: str,
    aspect_ratio: str,
    duration: int,
    start_frame: torch.Tensor | None,
) -> IO.NodeOutput:
    """Create + poll a Kling 3.0 Turbo task. Image-to-video when start_frame is given, else text-to-video."""
    if start_frame is not None:
        validate_image_dimensions(start_frame, min_width=300, min_height=300)
        validate_image_aspect_ratio(start_frame, (1, 2.5), (2.5, 1))
        contents = [Kling3TurboContent(type="first_frame", url=tensor_to_base64_string(start_frame))]
        if prompt:
            contents.insert(0, Kling3TurboContent(type="prompt", text=prompt))

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Re-run the task once — transient Kling-side generation failures are the most common cause.
  2. Inspect response.model_dump() in the error text to see the task status and outputs actually returned; a 'failed' status means the prompt/settings were rejected server-side.
  3. Simplify the prompt (the 'shot n, m, words; ...' storyboard string must be well-formed) and confirm resolution/aspect_ratio/duration are valid Turbo settings.
  4. If outputs consistently have a new shape (different type value), report a bug against comfy_api_nodes since the extractor only accepts type == 'video'.
Defensive patterns

Strategy: retry

Type guard

def turbo_has_video(resp: Kling3TurboQueryResponse) -> bool:
    task = resp.data[0] if resp.data else None
    return bool(task and task.outputs and any(o.type == "video" and o.url for o in task.outputs))

Try / catch

for attempt in range(2):
    try:
        return await execute_kling_turbo(...)
    except RuntimeError as e:
        if attempt == 0 and "without a video output" in str(e):
            continue  # transient server-side generation failure, retry once
        raise

Prevention

When it happens

Trigger: poll_op on /proxy/kling/tasks?task_ids=<id> returns a Kling3TurboQueryResponse whose data[0].outputs is empty, missing, or has no {'type': 'video', 'url': non-empty} entry — e.g. the task failed server-side with status 'failed' but poll_op returned it, or outputs only contain metadata.

Common situations: Turbo generation failed on Kling's side (content policy, internal error) yet reported a terminal status; API response shape changed so outputs use a different type string; transient server bug returning an incomplete task record.

Related errors


AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14). Data as JSON: /api/errors/887c2bbe4278ab13. Report an issue: GitHub.