Comfy-Org/ComfyUI · error · Exception
Kling task {response.data.task_id} succeeded but no image da
Error message
Kling task {response.data.task_id} succeeded but no image data found in response. What it means
Image-mode counterpart of the video check: raised by validate_image_result_response when a Kling image task succeeded but task_result.images is missing/empty. The task completed yet delivered no image record, which the node treats as a hard failure rather than returning blank output.
Source
Thrown at comfy_api_nodes/nodes_kling.py:315
error_msg = f"Kling initial request failed. Code: {response.code}, Message: {response.message}, Data: {response.data}"
logging.error(error_msg)
raise Exception(error_msg)
def validate_video_result_response(response) -> None:
"""Validates that the Kling task result contains a video."""
if not is_valid_video_response(response):
error_msg = f"Kling task {response.data.task_id} succeeded but no video data found in response."
logging.error("Error: %s.\nResponse: %s", error_msg, response)
raise Exception(error_msg)
def validate_image_result_response(response) -> None:
"""Validates that the Kling task result contains an image."""
if not is_valid_image_response(response):
error_msg = f"Kling task {response.data.task_id} succeeded but no image data found in response."
logging.error("Error: %s.\nResponse: %s", error_msg, response)
raise Exception(error_msg)
def validate_input_image(image: torch.Tensor) -> None:
"""
Validates the input image adheres to the expectations of the Kling API:
- The image resolution should not be less than 300*300px
- The aspect ratio of the image should be between 1:2.5 ~ 2.5:1
See: https://app.klingai.com/global/dev/document-api/apiReference/model/imageToVideo
"""
validate_image_dimensions(image, min_width=300, min_height=300)
validate_image_aspect_ratio(image, (1, 2.5), (2.5, 1))
def get_video_from_response(response) -> KlingVideoResult:
"""Returns the first video object from the Kling video generation task result.
Will raise an error if the response is not valid.
"""View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Re-run the task with a fresh submission
- Take the task_id from the message and inspect it via the Kling console
- Soften prompt content in case moderation removed the finished image
- Check for comfy_api_nodes updates if the empty result is consistent
Defensive patterns
Strategy: retry
Try / catch
for attempt in range(2):
try:
out = await kling_image_node(...)
break
except Exception as e:
if attempt == 1 or "no image data found" not in str(e):
raise Prevention
- Re-run the task on this upstream inconsistency
- Keep prompts policy-clean so finished images are not removed post-completion
- Track task_ids from error messages when reporting to Kling support
When it happens
Trigger: Kling image task (e.g. image-to-video first-frame generators or Kling image endpoints) finishing with an empty images array — moderation removal post-completion, storage failure, or payload schema drift.
Common situations: Generated image removed by moderation after task success; Kling result CDN issues; rare transient inconsistency on high-load days.
Related errors
- Kling task {response.data.task_id} succeeded but no video da
- Gemini API returned no response candidates. If you are using
- Gemini API blocked the request. Reasons: {blocked_reasons}
- Gemini did not generate an image. Model response: {model_mes
- Gemini did not generate an image. Try rephrasing your prompt
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/d05e1ed959ae0bd6.
Report an issue: GitHub.