{"record":{"id":"6088c9a785863a21","repo":"Comfy-Org/ComfyUI","slug":"the-end-frame-input-cannot-be-used-simultaneousl-6088c9","errorCode":null,"errorMessage":"The 'end_frame' input cannot be used simultaneously with storyboards.","messagePattern":"The 'end_frame' input cannot be used simultaneously with storyboards\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_kling.py","lineNumber":882,"sourceCode":"        seed: int = 0,\n    ) -> IO.NodeOutput:\n        _ = seed\n        if model_name == \"kling-video-o1\":\n            if duration > 10:\n                raise ValueError(\"kling-video-o1 does not support durations greater than 10 seconds.\")\n            if generate_audio:\n                raise ValueError(\"kling-video-o1 does not support audio generation.\")\n            if resolution == \"4k\":\n                raise ValueError(\"kling-video-o1 does not support 4k resolution.\")\n        stories_enabled = storyboards is not None and storyboards[\"storyboards\"] != \"disabled\"\n        if stories_enabled and model_name == \"kling-video-o1\":\n            raise ValueError(\"kling-video-o1 does not support storyboards.\")\n        prompt = normalize_omni_prompt_references(prompt)\n        validate_string(prompt, strip_whitespace=True, min_length=0 if stories_enabled else 1, max_length=2500)\n        if end_frame is not None and reference_images is not None:\n            raise ValueError(\"The 'end_frame' input cannot be used simultaneously with 'reference_images'.\")\n        if end_frame is not None and stories_enabled:\n            raise ValueError(\"The 'end_frame' input cannot be used simultaneously with storyboards.\")\n        if (\n            model_name == \"kling-video-o1\"\n            and duration not in (5, 10)\n            and end_frame is None\n            and reference_images is None\n        ):\n            raise ValueError(\n                \"Duration is only supported for 5 or 10 seconds if there is no end frame or reference images.\"\n            )\n\n        multi_shot = None\n        multi_prompt_list = None\n        if stories_enabled:\n            count = int(storyboards[\"storyboards\"].split()[0])\n            multi_shot = True\n            multi_prompt_list = []\n            for i in range(1, count + 1):\n                sb_prompt = storyboards[f\"storyboard_{i}_prompt\"]","sourceCodeStart":864,"sourceCodeEnd":900,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_kling.py#L864-L900","documentation":"Raised by OmniProFirstLastFrameNode.execute when end_frame is connected and storyboards are enabled. Storyboard (multi-shot) requests distribute duration across shots and the API derives the final frame itself, so an explicit end_frame cannot be combined with the multi_prompt structure; the node fails fast with a clear message.","triggerScenarios":"Connecting end_frame while the storyboards dict is present with a value other than 'disabled' on the OmniPro first/last frame node.","commonSituations":"A storyboard workflow is extended with an end frame to control the closing shot; or an end_frame workflow has the storyboard group left populated from an earlier edit.","solutions":["Set storyboards to 'disabled' (or disconnect the group) if the end frame matters more than multi-shot control","Remove end_frame if storyboard control is required, and describe the desired ending in the last storyboard prompt"],"exampleFix":"// before\nend_frame = load_last_frame.output\nstoryboards = {\"storyboards\": \"3 shots\", ...}\n\n// after\nend_frame = load_last_frame.output\nstoryboards = None","handlingStrategy":"validation","validationCode":"def end_frame_storyboards_ok(end_frame, storyboards: dict | None) -> bool:\n    stories = storyboards is not None and storyboards[\"storyboards\"] != \"disabled\"\n    return end_frame is None or not stories","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Choose one ending-control mechanism: storyboard prompts or an explicit end frame, never both","Reset the storyboard group whenever you wire end_frame into a previously storyboard-driven graph"],"tags":["kling","video","storyboards","mutual-exclusion","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}