Comfy-Org/ComfyUI · error · ValueError

The 'end_frame' input cannot be used simultaneously with sto

Error message

The 'end_frame' input cannot be used simultaneously with storyboards.

What it means

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.

Source

Thrown at comfy_api_nodes/nodes_kling.py:882

        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 None
        ):
            raise ValueError(
                "Duration is only supported for 5 or 10 seconds if there is no end frame or reference images."
            )

        multi_shot = None
        multi_prompt_list = None
        if stories_enabled:
            count = int(storyboards["storyboards"].split()[0])
            multi_shot = True
            multi_prompt_list = []
            for i in range(1, count + 1):
                sb_prompt = storyboards[f"storyboard_{i}_prompt"]

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Set storyboards to 'disabled' (or disconnect the group) if the end frame matters more than multi-shot control
  2. Remove end_frame if storyboard control is required, and describe the desired ending in the last storyboard prompt

Example fix

// before
end_frame = load_last_frame.output
storyboards = {"storyboards": "3 shots", ...}

// after
end_frame = load_last_frame.output
storyboards = None
Defensive patterns

Strategy: validation

Validate before calling

def end_frame_storyboards_ok(end_frame, storyboards: dict | None) -> bool:
    stories = storyboards is not None and storyboards["storyboards"] != "disabled"
    return end_frame is None or not stories

Prevention

When it happens

Trigger: Connecting end_frame while the storyboards dict is present with a value other than 'disabled' on the OmniPro first/last frame node.

Common situations: 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.

Related errors


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