Comfy-Org/ComfyUI · error · ValueError
kling-video-o1 does not support durations greater than 10 se
Error message
kling-video-o1 does not support durations greater than 10 seconds.
What it means
Image-to-video variant of the o1 duration guard: for kling-video-o1 i2v, duration must be at most 10 seconds (checked as duration > 10, slightly looser than the t2v node's exact 5-or-10 check, though the later per-model branch still enforces 5/10). Any duration above 10 raises before the request.
Source
Thrown at comfy_api_nodes/nodes_kling.py:869
@classmethod
async def execute(
cls,
model_name: str,
prompt: str,
duration: int,
first_frame: Input.Image,
end_frame: Input.Image | None = None,
reference_images: Input.Image | None = None,
resolution: str = "1080p",
storyboards: dict | None = None,
generate_audio: bool = False,
seed: int = 0,
) -> IO.NodeOutput:
_ = seed
if model_name == "kling-video-o1":
if duration > 10:
raise ValueError("kling-video-o1 does not support durations greater than 10 seconds.")
if generate_audio:
raise ValueError("kling-video-o1 does not support audio generation.")
if resolution == "4k":
raise ValueError("kling-video-o1 does not support 4k resolution.")
stories_enabled = storyboards is not None and storyboards["storyboards"] != "disabled"
if stories_enabled and model_name == "kling-video-o1":
raise ValueError("kling-video-o1 does not support storyboards.")
prompt = normalize_omni_prompt_references(prompt)
validate_string(prompt, strip_whitespace=True, min_length=0 if stories_enabled else 1, max_length=2500)
if end_frame is not None and reference_images is not None:
raise ValueError("The 'end_frame' input cannot be used simultaneously with 'reference_images'.")
if end_frame is not None and stories_enabled:
raise ValueError("The 'end_frame' input cannot be used simultaneously with storyboards.")
if (
model_name == "kling-video-o1"
and duration not in (5, 10)
and end_frame is None
and reference_images is NoneView on GitHub (pinned to 1c6d8d45b3)
Solutions
- Set duration to 10 seconds or fewer (5 or 10 are the supported values)
- Use a different model for longer image-to-video clips
- Generate in segments and concatenate with a video-join node
Example fix
// before model_name = "kling-video-o1"; duration = 15 // after model_name = "kling-video-o1"; duration = 10
Defensive patterns
Strategy: validation
Validate before calling
def o1_i2v_duration_ok(model_name: str, duration: int) -> bool:
return model_name != "kling-video-o1" or duration <= 10
assert o1_i2v_duration_ok(model_name, duration) Type guard
def i2v_duration_supported(model_name: str, duration: int) -> bool:
if model_name != "kling-video-o1":
return True
return duration <= 10 and duration in (5, 10) # later branch enforces 5/10 Try / catch
try:
out = await kling_i2v_node(model_name=model, duration=duration, ...)
except ValueError as e:
if "does not support durations" in str(e):
out = await kling_i2v_node(model_name=model, duration=10, ...)
else:
raise Prevention
- Cap o1 i2v duration at 10s (use 5 or 10)
- For longer i2v, chain clips and join, or switch model
When it happens
Trigger: kling-video-o1 image-to-video with duration set to 15+; workflows migrated from models supporting longer i2v durations.
Common situations: Model swap without adjusting duration; assuming i2v supports t2v's longer-duration tiers.
Related errors
- kling-video-o1 only supports durations of 5 or 10 seconds.
- kling-video-o1 does not support audio generation.
- kling-video-o1 does not support 4k resolution.
- kling-video-o1 does not support storyboards.
- Total storyboard duration ({total_storyboard_duration}s) mus
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/e2d58941c695d4ae.
Report an issue: GitHub.