Comfy-Org/ComfyUI · error · ValueError

Connect at least 2 Luma Ray 3.2 Keyframe nodes (use Luma Ray

Error message

Connect at least 2 Luma Ray 3.2 Keyframe nodes (use Luma Ray 3.2 Image to Video for a single start/end frame).

What it means

Raised by the Luma Ray 3.2 keyframe video node (comfy_api_nodes/nodes_luma.py:1235) when fewer than 2 keyframe nodes are chained into its keyframes input. The keyframes API path is for multi-frame interpolation; a single start or end frame should go through the dedicated image-to-video node instead.

Source

Thrown at comfy_api_nodes/nodes_luma.py:1235

                IO.Hidden.unique_id,
            ],
            is_api_node=True,
            price_badge=_BADGE_RAY32_VIDEO,
        )

    @classmethod
    async def execute(
        cls,
        prompt: str,
        resolution: str,
        duration: str,
        seed: int,
        keyframes: LumaRay32KeyframeChain | None = None,
    ) -> IO.NodeOutput:
        validate_string(prompt, strip_whitespace=True, min_length=1, max_length=6000)
        items = keyframes.items if keyframes is not None else []
        if len(items) < 2:
            raise ValueError(
                "Connect at least 2 Luma Ray 3.2 Keyframe nodes "
                "(use Luma Ray 3.2 Image to Video for a single start/end frame)."
            )
        if len(items) > 64:
            raise ValueError(f"Ray 3.2 supports at most 64 keyframes; got {len(items)}.")
        maxframe = 120 if duration == "5s" else 240
        duration_seconds = maxframe / 24  # 5.0 or 10.0
        # Resolve each keyframe to an output-frame index, then order by position
        # (so the user can chain keyframes in any order — the position is what places them)
        placed: list[tuple[int, torch.Tensor]] = []
        for item in items:
            if item.mode == LUMA_KEYFRAME_MODE_SECONDS:
                if item.value > duration_seconds:
                    raise ValueError(
                        f"Keyframe position {item.value:g}s is past the end of the {duration} video; "
                        f"use 0-{duration_seconds:g}s (or switch the keyframe to fraction mode)."
                    )
                idx = round(item.value * 24)

View on GitHub (pinned to 1c6d8d45b3)

Solutions

  1. Chain at least 2 Luma Ray 3.2 Keyframe nodes into the keyframes input.
  2. For a single start/end frame, use Luma Ray 3.2 Image to Video instead (as the message says).
  3. Verify the chain nodes actually feed the keyframes input and not an unrelated image input.
Defensive patterns

Strategy: validation

Validate before calling

items = keyframes.items if keyframes is not None else []
if len(items) < 2:
    raise ValueError("Connect >= 2 Ray 3.2 keyframe nodes, or use Image to Video for one frame")

Prevention

When it happens

Trigger: Executing LumaRay32KeyframeVideoNode with zero keyframe nodes, or with exactly one LumaRay32KeyframeNode connected (keyframes=None also yields 0 items).

Common situations: User tests the node with a single keyframe first; chain input accidentally disconnected; misunderstanding that this node requires ≥2 anchored positions.

Related errors


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