{"record":{"id":"09ed9dd98ec4a954","repo":"Comfy-Org/ComfyUI","slug":"looping-is-not-available-when-an-end-frame-is-set","errorCode":null,"errorMessage":"Looping is not available when an end_frame is set.","messagePattern":"Looping is not available when an end_frame is set\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_luma.py","lineNumber":1109,"sourceCode":"            is_api_node=True,\n            price_badge=_BADGE_RAY32_VIDEO_5S,\n        )\n\n    @classmethod\n    async def execute(\n        cls,\n        prompt: str,\n        resolution: str,\n        loop: bool,\n        seed: int,\n        start_frame: torch.Tensor | None = None,\n        end_frame: torch.Tensor | None = None,\n    ) -> IO.NodeOutput:\n        validate_string(prompt, strip_whitespace=True, min_length=1, max_length=6000)\n        if start_frame is None and end_frame is None:\n            raise ValueError(\"Provide at least one of start_frame / end_frame.\")\n        if loop and end_frame is not None:\n            raise ValueError(\"Looping is not available when an end_frame is set.\")\n        video = Luma2VideoOptions(resolution=resolution, duration=\"5s\", loop=loop or None)\n        if start_frame is not None:\n            url = await upload_image_to_comfyapi(cls, start_frame, mime_type=\"image/png\")\n            video.start_frame = Luma2ImageRef(url=url)\n        if end_frame is not None:\n            url = await upload_image_to_comfyapi(cls, end_frame, mime_type=\"image/png\")\n            video.end_frame = Luma2ImageRef(url=url)\n        request = Luma2GenerationRequest(prompt=prompt, model=\"ray-3.2\", type=\"video\", video=video)\n        return await _ray32_generate(cls, request)\n\n\nclass LumaRay32KeyframeNode(IO.ComfyNode):\n    @classmethod\n    def define_schema(cls) -> IO.Schema:\n        return IO.Schema(\n            node_id=\"LumaRay32KeyframeNode\",\n            display_name=\"Luma Ray 3.2 Keyframe\",\n            category=\"partner/video/Luma\",","sourceCodeStart":1091,"sourceCodeEnd":1127,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_luma.py#L1091-L1127","documentation":"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.","triggerScenarios":"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).","commonSituations":"User enables loop for ping-pong output but keeps a distinct end frame wired; settings copied from a non-looping keyframe workflow.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if loop and end_frame is not None:\n    loop = False  # or drop end_frame","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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."],"tags":["luma","ray-3-2","loop","end-frame","input-validation","comfy-api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}