{"record":{"id":"6a147ecb453f9045","repo":"Comfy-Org/ComfyUI","slug":"total-storyboard-duration-duration-s-must-be-be","errorCode":null,"errorMessage":"Total storyboard duration ({duration}s) must be between 3 and 15 seconds.","messagePattern":"Total storyboard duration \\((.+?)s\\) must be between 3 and 15 seconds\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"comfy_api_nodes/nodes_kling.py","lineNumber":2446,"sourceCode":"\n        multi_prompt_list = None\n        if shot_type == \"customize\":\n            count = int(multi_shot[\"multi_shot\"].split()[0])\n            multi_prompt_list = []\n            for i in range(1, count + 1):\n                sb_prompt = multi_shot[f\"storyboard_{i}_prompt\"]\n                sb_duration = multi_shot[f\"storyboard_{i}_duration\"]\n                validate_string(sb_prompt, field_name=f\"storyboard_{i}_prompt\", min_length=1, max_length=512)\n                multi_prompt_list.append(\n                    MultiPromptEntry(\n                        index=i,\n                        prompt=sb_prompt,\n                        duration=str(sb_duration),\n                    )\n                )\n            duration = sum(int(e.duration) for e in multi_prompt_list)\n            if duration < 3 or duration > 15:\n                raise ValueError(\n                    f\"Total storyboard duration ({duration}s) must be between 3 and 15 seconds.\"\n                )\n        else:\n            duration = multi_shot[\"duration\"]\n            validate_string(multi_shot[\"prompt\"], min_length=1, max_length=2500)\n\n        if model[\"model\"] == \"kling-3.0-turbo\":\n            turbo_prompt = build_turbo_shot_prompt(multi_prompt_list) if custom_multi_shot else multi_shot[\"prompt\"]\n            return await execute_kling_turbo(\n                cls,\n                prompt=turbo_prompt,\n                resolution=model[\"resolution\"],\n                aspect_ratio=model[\"aspect_ratio\"],\n                duration=duration,\n                start_frame=start_frame,\n            )\n\n        if start_frame is not None:","sourceCodeStart":2428,"sourceCodeEnd":2464,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_kling.py#L2428-L2464","documentation":"Client-side validation error raised in the Kling video node when custom multi-shot storyboard mode is enabled: the summed per-shot durations must total 3–15 seconds. It is thrown before any network call, so it costs no credits.","triggerScenarios":"Custom multi-shot enabled with storyboard_N_duration widgets whose sum (parsed as int) is < 3 or > 15; e.g. two shots of 1s (total 2s) or four shots of 5s (total 20s). Non-integer widget values are coerced via int() and can sum unexpectedly.","commonSituations":"User adds/removes storyboard shots and forgets to rebalance durations; duration widgets fed by workflow logic produce fractional values that truncate; mixing shot counts across model versions with different totals.","solutions":["Adjust the storyboard_N_duration widgets so they sum to 3–15 seconds (e.g. 3 shots x 5s = 15s).","Count the number of active storyboard_N_prompt/duration pairs — every prompt with content contributes a shot to the sum.","If using kling-3.0-turbo, remember build_turbo_shot_prompt embeds these same durations, so the same total applies to the rendered prompt."],"exampleFix":"// before: shots of 1s + 1s -> total 2s, raises\n// after: shots of 2s + 3s -> total 5s, passes\nmulti_shot = {\n    \"storyboard_1_duration\": 2,\n    \"storyboard_2_duration\": 3,\n    ...\n}","handlingStrategy":"validation","validationCode":"total = sum(int(d) for d in storyboard_durations)\nif not 3 <= total <= 15:\n    raise ValueError(f\"Storyboard total {total}s outside 3-15s; adjust shot durations\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Sum all storyboard_N_duration widgets whenever you add or remove a shot.","Keep per-shot durations integer-valued.","Remember turbo mode embeds the same durations into the rendered prompt."],"tags":["kling","api-nodes","validation","multi-shot","pre-flight"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}