Comfy-Org/ComfyUI · error · ValueError
Provide only one of first_frame or first_frame_asset_id, not
Error message
Provide only one of first_frame or first_frame_asset_id, not both.
What it means
Validation in the first/last-frame (keyframe) Seedance node: the first frame can be supplied either as an image tensor (first_frame) or as a previously uploaded asset id string (first_frame_asset_id), but not both at once. Supplying both is ambiguous about which input wins, so the node rejects it before making any API call.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:2499
@classmethod
async def execute(
cls,
model: dict,
seed: int,
watermark: bool,
first_frame: Input.Image | None = None,
last_frame: Input.Image | None = None,
first_frame_asset_id: str = "",
last_frame_asset_id: str = "",
) -> IO.NodeOutput:
validate_string(model["prompt"], strip_whitespace=True, min_length=1)
model_id = SEEDANCE_MODELS[model["model"]]
first_frame_asset_id = first_frame_asset_id.strip()
last_frame_asset_id = last_frame_asset_id.strip()
if first_frame is not None and first_frame_asset_id:
raise ValueError("Provide only one of first_frame or first_frame_asset_id, not both.")
if first_frame is None and not first_frame_asset_id:
raise ValueError("Either first_frame or first_frame_asset_id is required.")
if last_frame is not None and last_frame_asset_id:
raise ValueError("Provide only one of last_frame or last_frame_asset_id, not both.")
if model_id == "dreamina-seedance-2-5-260628":
# 2.5 accepts ratio="adaptive" only here and keeps the first frame's own aspect
# (a 1920x1088 frame yields 850x482, not a grid ratio), so pre-sizing the frames to a
# supported pixel pair would crop framing the model would otherwise have preserved.
request_ratio = "adaptive"
if first_frame is not None:
first_frame = _prepare_seedance_image(first_frame)
if last_frame is not None:
last_frame = _prepare_seedance_image(last_frame)
elif first_frame_asset_id or last_frame_asset_id:
request_ratio = model["ratio"]
if first_frame is not None:
first_frame = _prepare_seedance_image(first_frame)View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Clear the first_frame_asset_id widget (leave it empty) if you want to feed the image directly.
- Or disconnect the first_frame image if you intend to reuse an uploaded asset id.
Defensive patterns
Strategy: validation
Validate before calling
if first_frame is not None and first_frame_asset_id.strip():
raise ValueError("pass only one of first_frame / first_frame_asset_id") Prevention
- Treat image input and asset-id widget as mutually exclusive alternatives.
- Clear asset-id widgets when switching a workflow to direct image inputs.
When it happens
Trigger: Calling the keyframe node with both first_frame wired to an image AND a non-empty first_frame_asset_id string (after whitespace stripping).
Common situations: Workflows migrated from asset-id usage to direct image input where the old asset id string was left in the widget; copying node configurations between graphs.
Related errors
- Provide only one of last_frame or last_frame_asset_id, not b
- Either first_frame or first_frame_asset_id is required.
- Asset {aid} is not an Image asset.
- At least one reference image or video or asset is required.
- Too many reference images: {total_images} (images={len(refer
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/f98b39d39057e5c9.
Report an issue: GitHub.