{"record":{"id":"64e7361f09032d92","repo":"Comfy-Org/ComfyUI","slug":"spreading-len-images-images-across-the-clip-nee","errorCode":null,"errorMessage":"Spreading {len(images)} images across the clip needs an explicit duration: set duration, or place the images yourself with 'at times'.","messagePattern":"Spreading (.+?) images across the clip needs an explicit duration: set duration, or place the images yourself with 'at times'\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bfl.py","lineNumber":1333,"sourceCode":"        keyframes: IO.Autogrow.Type,\n        placement: dict,\n        aspect_ratio: str,\n        duration: str,\n        resolution: str,\n        generate_audio: bool,\n        safety_tolerance: int,\n        seed: int,\n    ) -> IO.NodeOutput:\n        fields = cls.common_fields(prompt, aspect_ratio, duration, resolution, generate_audio, safety_tolerance)\n        images = _flux3_collect_images(keyframes, \"keyframes\")\n        if not images:\n            raise ValueError(\"Connect at least one keyframe image.\")\n        times = None\n        if placement[\"placement\"] == \"at times\":\n            times = _flux3_parse_times(placement[\"times\"], len(images), fields[\"duration\"])\n        elif len(images) >= 3 and fields[\"duration\"] == \"auto\":\n            # spread images land evenly between the first and last, which needs a known length\n            raise ValueError(\n                f\"Spreading {len(images)} images across the clip needs an explicit duration: \"\n                \"set duration, or place the images yourself with 'at times'.\"\n            )\n        urls = await upload_images_to_comfyapi(\n            cls, images, max_images=_FLUX3_MAX_IMAGES, wait_label=\"Uploading keyframes\"\n        )\n        request = Flux3ImageToVideoRequest(\n            keyframes=list(zip(times, urls)) if times is not None else urls,\n            **fields,\n        )\n        return await _flux3_execute(cls, request)\n\n\nclass Flux3VideoContinuationNode(Flux3VideoNodeBase):\n    RATE_HD = 0.5863\n    RATE_FHD = 0.7579\n\n    @classmethod","sourceCodeStart":1315,"sourceCodeEnd":1351,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bfl.py#L1315-L1351","documentation":"The FLUX.3 keyframe node spreads 3+ keyframes evenly between the first and last frame, which requires a known clip length. When duration is 'auto' the API cannot compute even spacing, so the node raises this before uploading anything.","triggerScenarios":"Keyframes Autogrow has >= 3 images, placement mode is the default 'spread', and the duration widget is left on 'auto' (fields['duration'] == 'auto').","commonSituations":"User chains several keyframes assuming the model picks its own length; duration widget forgotten after copying a 2-keyframe workflow that worked (2 images map to first/last frames and are exempt).","solutions":["Set the duration widget to an explicit value (e.g. '5s' or whatever the combo offers) so spread math has a clip length.","Or switch placement to 'at times' and give explicit timestamps for each keyframe via _flux3_parse_times.","Or reduce to 2 keyframes, which use first/last frame positions and work with 'auto'."],"exampleFix":"// before\nplacement = {'placement': 'spread', 'times': ''}\nduration = 'auto'\n// after\nplacement = {'placement': 'spread', 'times': ''}\nduration = '5s'","handlingStrategy":"validation","validationCode":"n = len(collected_keyframes)\nif n >= 3 and placement['placement'] != 'at times' and duration == 'auto':\n    raise UserError('Set an explicit duration, or use at-times placement, before running.')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Any time you connect 3+ keyframes, immediately set duration to a concrete value.","Prefer 'at times' placement for full control over keyframe positions."],"tags":["comfyui","flux3","validation","duration","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}