{"record":{"id":"81bf5975760e2791","repo":"Comfy-Org/ComfyUI","slug":"currently-only-one-input-image-is-supported","errorCode":null,"errorMessage":"Currently only one input image is supported.","messagePattern":"Currently only one input image is supported\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"warning","filePath":"comfy_api_nodes/nodes_ltxv.py","lineNumber":362,"sourceCode":"\n    @classmethod\n    async def execute(\n        cls,\n        image: Input.Image,\n        model: str,\n        prompt: str,\n        duration: int,\n        resolution: str,\n        fps: int = 25,\n        generate_audio: bool = False,\n    ) -> IO.NodeOutput:\n        validate_string(prompt, min_length=1, max_length=10000)\n        if duration > 10 and (model != \"LTX-2 (Fast)\" or resolution != \"1920x1080\" or fps != 25):\n            raise ValueError(\n                \"Durations over 10s are only available for the Fast model at 1920x1080 resolution and 25 FPS.\"\n            )\n        if get_number_of_images(image) != 1:\n            raise ValueError(\"Currently only one input image is supported.\")\n        response = await sync_op_raw(\n            cls,\n            ApiEndpoint(\"/proxy/ltx/v1/image-to-video\", \"POST\"),\n            data=ExecuteTaskRequest(\n                image_uri=(await upload_images_to_comfyapi(cls, image, max_images=1, mime_type=\"image/png\"))[0],\n                prompt=prompt,\n                model=MODELS_MAP[model],\n                duration=duration,\n                resolution=resolution,\n                fps=fps,\n                generate_audio=generate_audio,\n            ),\n            as_binary=True,\n            max_retries=1,\n        )\n        return IO.NodeOutput(InputImpl.VideoFromFile(BytesIO(response)))\n\n","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_ltxv.py#L344-L380","documentation":"Client-side ValueError in the v1 LTX image-to-video node: the node supports exactly one input image, and get_number_of_images(image) returned something other than 1 (a batch or zero images after mask/crop upstream).","triggerScenarios":"Feeding a batched IMAGE tensor (shape[0] > 1) or an empty tensor into the v1 image-to-video node; common when an upstream node produces batches (e.g. Load Image with batch, empty Latent/crop edge cases).","commonSituations":"LoadImage batch size > 1; an upstream crop/resize node emitting an empty batch for degenerate inputs; chaining from a node that splits or packs images unexpectedly.","solutions":["Ensure exactly one image reaches the node: set batch size to 1 in the loader.","Insert a Split Image or Image Batch index selection to pick a single frame from a batch.","Check upstream nodes for empty outputs (0 images) when the error appears with blank inputs."],"exampleFix":"// before: batched input\nimage = load_image_batch(path, batch=4)  # shape[0]=4\n// after\nimage = load_image(path)  # shape[0]=1, single image","handlingStrategy":"validation","validationCode":"assert image.shape[0] == 1, f\"Expected 1 image, got batch of {image.shape[0]}\"","typeGuard":"def is_single_image(image: torch.Tensor) -> bool:\n    return image.ndim >= 1 and image.shape[0] == 1","tryCatchPattern":null,"preventionTips":["Set batch size 1 in image loaders feeding LTX v1 nodes.","Split batches and select one frame before the node.","Watch for upstream nodes emitting empty tensors."],"tags":["ltx","api-nodes","validation","image-batch","pre-flight"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}