Comfy-Org/ComfyUI · error · ValueError
Too many reference videos: {total_videos} (videos={len(refer
Error message
Too many reference videos: {total_videos} (videos={len(reference_videos)}, video assets={len(reference_video_assets)}). Maximum is {limits['max_videos']}. What it means
Client-side cap on reference videos: the number of direct reference_videos plus resolved video assets must not exceed limits["max_videos"] (10 for Seedance 2.5). Videos are heavy inputs both for upload time and provider-side processing, so the node rejects over-quota inputs before uploading anything.
Source
Thrown at comfy_api_nodes/nodes_bytedance.py:2759
)
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(
f"Too many reference audios: {total_audios} "
f"(audios={len(reference_audios)}, audio assets={len(reference_audio_assets)}). "
f"Maximum is {limits['max_audios']}."
)
for key in reference_images:
reference_images[key] = _prepare_seedance_image(reference_images[key])
has_video_input = total_videos > 0
if model.get("auto_downscale") and reference_videos:View on GitHub (pinned to 1c6d8d45b3)
Solutions
- Trim the reference video list to the stated maximum.
- Concatenate or pre-select the most relevant clips and pass fewer videos.
- Use image references for style/identity and keep video references for motion only.
Defensive patterns
Strategy: validation
Validate before calling
total = len(reference_videos) + len(reference_video_assets) assert total <= seedance2_reference_limits(model_id)["max_videos"]
Prevention
- Keep video references to the few clips that actually carry the motion you need.
- Re-check the cap when switching models.
When it happens
Trigger: Connecting more reference video inputs than the model's max_videos, or combining reference_videos and reference_assets video ids above the cap.
Common situations: Multi-shot reference workflows with many clips; combining old uploaded video assets with newly connected clips.
Related errors
- Too many reference images: {total_images} (images={len(refer
- Too many reference audios: {total_audios} (audios={len(refer
- Reference video {index} is too small: {w}x{h} = {pixels:,} t
- Reference video {index} is too large: {w}x{h} = {pixels:,} t
- Provide only one of first_frame or first_frame_asset_id, not
AI-assisted analysis of Comfy-Org/ComfyUI@1c6d8d45b3 (2026-08-14).
Data as JSON: /api/errors/05fa6217c5bec308.
Report an issue: GitHub.