Comfy-Org/ComfyUI · warning · ValueError
Currently only one input image is supported.
Error message
Currently only one input image is supported.
What it means
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).
Source
Thrown at comfy_api_nodes/nodes_ltxv.py:362
@classmethod
async def execute(
cls,
image: Input.Image,
model: str,
prompt: str,
duration: int,
resolution: str,
fps: int = 25,
generate_audio: bool = False,
) -> IO.NodeOutput:
validate_string(prompt, min_length=1, max_length=10000)
if duration > 10 and (model != "LTX-2 (Fast)" or resolution != "1920x1080" or fps != 25):
raise ValueError(
"Durations over 10s are only available for the Fast model at 1920x1080 resolution and 25 FPS."
)
if get_number_of_images(image) != 1:
raise ValueError("Currently only one input image is supported.")
response = await sync_op_raw(
cls,
ApiEndpoint("/proxy/ltx/v1/image-to-video", "POST"),
data=ExecuteTaskRequest(
image_uri=(await upload_images_to_comfyapi(cls, image, max_images=1, mime_type="image/png"))[0],
prompt=prompt,
model=MODELS_MAP[model],
duration=duration,
resolution=resolution,
fps=fps,
generate_audio=generate_audio,
),
as_binary=True,
max_retries=1,
)
return IO.NodeOutput(InputImpl.VideoFromFile(BytesIO(response)))
View on GitHub (pinned to 1c6d8d45b3)
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.
Example fix
// before: batched input image = load_image_batch(path, batch=4) # shape[0]=4 // after image = load_image(path) # shape[0]=1, single image
Defensive patterns
Strategy: validation
Validate before calling
assert image.shape[0] == 1, f"Expected 1 image, got batch of {image.shape[0]}" Type guard
def is_single_image(image: torch.Tensor) -> bool:
return image.ndim >= 1 and image.shape[0] == 1 Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Related errors
- Currently only one last frame image is supported.
- Durations over 10s require a 720p or 1080p resolution and 24
- Durations over 10s are only available for the Fast model at
- Audio duration must be between 2 and 20 seconds, got {audio_
- Total storyboard duration ({duration}s) must be between 3 an
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/81bf5975760e2791.
Report an issue: GitHub.