Comfy-Org/ComfyUI · error · ValueError
Looping is not available when an end_frame is set.
Error message
Looping is not available when an end_frame is set.
What it means
Raised by LumaRay32ImageToVideoNode (comfy_api_nodes/nodes_luma.py:1109) when loop=True while an end_frame is connected. A loop must end where it started, which conflicts with anchoring the ending to a different image, so the combination is rejected before upload.
Source
Thrown at comfy_api_nodes/nodes_luma.py:1109
is_api_node=True,
price_badge=_BADGE_RAY32_VIDEO_5S,
)
@classmethod
async def execute(
cls,
prompt: str,
resolution: str,
loop: bool,
seed: int,
start_frame: torch.Tensor | None = None,
end_frame: torch.Tensor | None = None,
) -> IO.NodeOutput:
validate_string(prompt, strip_whitespace=True, min_length=1, max_length=6000)
if start_frame is None and end_frame is None:
raise ValueError("Provide at least one of start_frame / end_frame.")
if loop and end_frame is not None:
raise ValueError("Looping is not available when an end_frame is set.")
video = Luma2VideoOptions(resolution=resolution, duration="5s", loop=loop or None)
if start_frame is not None:
url = await upload_image_to_comfyapi(cls, start_frame, mime_type="image/png")
video.start_frame = Luma2ImageRef(url=url)
if end_frame is not None:
url = await upload_image_to_comfyapi(cls, end_frame, mime_type="image/png")
video.end_frame = Luma2ImageRef(url=url)
request = Luma2GenerationRequest(prompt=prompt, model="ray-3.2", type="video", video=video)
return await _ray32_generate(cls, request)
class LumaRay32KeyframeNode(IO.ComfyNode):
@classmethod
def define_schema(cls) -> IO.Schema:
return IO.Schema(
node_id="LumaRay32KeyframeNode",
display_name="Luma Ray 3.2 Keyframe",
category="partner/video/Luma",View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Disconnect end_frame if you want a looping video (loop closes back to start_frame).
- Or disable loop to keep the explicit end_frame.
- Use start_frame only plus prompt to control the trajectory of a loop.
Defensive patterns
Strategy: validation
Validate before calling
if loop and end_frame is not None:
loop = False # or drop end_frame Prevention
- Remember loops close back to the start frame; an end frame contradicts that by definition.
- When enabling loop, disconnect end_frame in the same edit.
When it happens
Trigger: Executing the Ray 3.2 image-to-video node with loop enabled and both start_frame and end_frame connected (end_frame alone with loop also triggers it).
Common situations: User enables loop for ping-pong output but keeps a distinct end frame wired; settings copied from a non-looping keyframe workflow.
Related errors
- Looping is only available with 5s duration on Ray 3.2.
- Provide at least one of start_frame / end_frame.
- Connect at least 2 Luma Ray 3.2 Keyframe nodes (use Luma Ray
- Ray 3.2 supports at most 64 keyframes; got {len(items)}.
- Keyframe position {item.value:g}s is past the end of the {du
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/09ed9dd98ec4a954.
Report an issue: GitHub.