Comfy-Org/ComfyUI · error · Exception
At least one of first_image and last_image requires an input
Error message
At least one of first_image and last_image requires an input.
What it means
Raised by the legacy Luma keyframe video node (comfy_api_nodes/nodes_luma.py:561) when both first_image and last_image are None. The Luma generations API requires at least one keyframe image to anchor the video, so the node fails fast before calling _convert_to_keyframes or the remote endpoint.
Source
Thrown at comfy_api_nodes/nodes_luma.py:561
is_api_node=True,
price_badge=PRICE_BADGE_VIDEO,
)
@classmethod
async def execute(
cls,
prompt: str,
model: str,
resolution: str,
duration: str,
loop: bool,
seed,
first_image: torch.Tensor = None,
last_image: torch.Tensor = None,
luma_concepts: LumaConceptChain = None,
) -> IO.NodeOutput:
if first_image is None and last_image is None:
raise Exception("At least one of first_image and last_image requires an input.")
keyframes = await cls._convert_to_keyframes(first_image, last_image)
duration = duration if model != LumaVideoModel.ray_1_6 else None
resolution = resolution if model != LumaVideoModel.ray_1_6 else None
response_api = await sync_op(
cls,
ApiEndpoint(path="/proxy/luma/generations", method="POST"),
response_model=LumaGeneration,
data=LumaGenerationRequest(
prompt=prompt,
model=model,
aspect_ratio=LumaAspectRatio.ratio_16_9, # ignored, but still needed by the API for some reason
resolution=resolution,
duration=duration,
loop=loop,
keyframes=keyframes,
concepts=luma_concepts.create_api_model() if luma_concepts else None,
),
)View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Connect an image to first_image (start frame) or last_image (end frame).
- If you want prompt-only Luma video, use the dedicated text-to-video Luma node instead.
- Check for accidentally disconnected edges after graph refactors.
Defensive patterns
Strategy: validation
Validate before calling
if first_image is None and last_image is None:
raise ValueError("Wire a start or end frame, or use the Luma text-to-video node") Prevention
- Pick the node variant (text-to-video vs image-to-video) based on whether you have frames.
- After graph edits, re-verify required edges into Luma image-to-video nodes.
When it happens
Trigger: Executing LumaVideoNode (or the image-to-video variant) with neither first_image nor last_image wired, e.g. relying on prompt-only generation against a node whose schema demands a start or end frame.
Common situations: User copies a text-to-video workflow into the image-to-video node, or disconnects an image input during graph editing and re-runs the queue.
Related errors
- 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
- Two keyframes resolve to the same output frame ({a}) for a {
- Maximum {max_count} reference images are allowed.
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/fb93aee90a9b908d.
Report an issue: GitHub.