Comfy-Org/ComfyUI · error · ValueError
At least one reference image or video or asset is required.
Error message
At least one reference image or video or asset is required.
What it means
The Seedance 2 reference-based generation node requires at least one visual reference: a reference image, reference video, or their asset equivalents. The only exception is Seedance 2.5 (dreamina-seedance-2-5-260628) with audio references. When nothing is connected and the exception does not apply, the node fails fast before any upload or API call.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:2748
watermark: bool,
) -> IO.NodeOutput:
validate_string(model["prompt"], strip_whitespace=True, min_length=1)
reference_images = model.get("reference_images", {})
reference_videos = model.get("reference_videos", {})
reference_audios = model.get("reference_audios", {})
reference_assets = model.get("reference_assets", {})
reference_image_assets, reference_video_assets, reference_audio_assets = await _resolve_reference_assets(
cls, list(reference_assets.values())
)
model_id = SEEDANCE_MODELS[model["model"]]
limits = seedance2_reference_limits(model_id)
if not reference_images and not reference_videos and not reference_image_assets and not reference_video_assets:
if model_id != "dreamina-seedance-2-5-260628" or not (reference_audios or reference_audio_assets):
raise ValueError("At least one reference image or video or asset is required.")
total_images = len(reference_images) + len(reference_image_assets)
if total_images > limits["max_images"]:
raise ValueError(
f"Too many reference images: {total_images} "
f"(images={len(reference_images)}, image assets={len(reference_image_assets)}). "
f"Maximum is {limits['max_images']}."
)
total_videos = len(reference_videos) + len(reference_video_assets)
if total_videos > limits["max_videos"]:
raise ValueError(
f"Too many reference videos: {total_videos} "
f"(videos={len(reference_videos)}, video assets={len(reference_video_assets)}). "
f"Maximum is {limits['max_videos']}."
)
total_audios = len(reference_audios) + len(reference_audio_assets)
if total_audios > limits["max_audios"]:
raise ValueError(View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Connect at least one reference image or video (or its asset id) to the node.
- Use the plain text-to-video Seedance node if you want no references.
- On Seedance 2.5 only: reference audios alone are acceptable if that is the intended mode.
Defensive patterns
Strategy: validation
Validate before calling
has_visual = bool(reference_images or reference_videos or reference_image_assets or reference_video_assets)
if not has_visual and not (is_seedance_25 and (reference_audios or reference_audio_assets)):
raise ValueError("connect at least one visual reference") Prevention
- Use the t2v node for no-reference generation.
- Only Seedance 2.5 may run this node with audio references alone.
When it happens
Trigger: Calling the reference-mode node with all reference_images, reference_videos, and reference_assets empty, and either a non-2.5 model or 2.5 with no reference audios either.
Common situations: Using the reference node for text-to-video instead of the t2v node; forgetting to wire references when switching models; iterating on a workflow where the reference branch was deleted.
Related errors
- Either first_frame or first_frame_asset_id is required.
- Provide only one of first_frame or first_frame_asset_id, not
- Provide only one of last_frame or last_frame_asset_id, not b
- Asset {aid} is not an Image asset.
- 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/5dc7db511be4fc3c.
Report an issue: GitHub.