{"record":{"id":"05fa6217c5bec308","repo":"Comfy-Org/ComfyUI","slug":"too-many-reference-videos-total-videos-videos","errorCode":null,"errorMessage":"Too many reference videos: {total_videos} (videos={len(reference_videos)}, video assets={len(reference_video_assets)}). Maximum is {limits['max_videos']}.","messagePattern":"Too many reference videos: (.+?) \\(videos=(.+?), video assets=(.+?)\\)\\. Maximum is (.+?)\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"comfy_api_nodes/nodes_bytedance.py","lineNumber":2759,"sourceCode":"        )\n\n        model_id = SEEDANCE_MODELS[model[\"model\"]]\n        limits = seedance2_reference_limits(model_id)\n\n        if not reference_images and not reference_videos and not reference_image_assets and not reference_video_assets:\n            if model_id != \"dreamina-seedance-2-5-260628\" or not (reference_audios or reference_audio_assets):\n                raise ValueError(\"At least one reference image or video or asset is required.\")\n\n        total_images = len(reference_images) + len(reference_image_assets)\n        if total_images > limits[\"max_images\"]:\n            raise ValueError(\n                f\"Too many reference images: {total_images} \"\n                f\"(images={len(reference_images)}, image assets={len(reference_image_assets)}). \"\n                f\"Maximum is {limits['max_images']}.\"\n            )\n        total_videos = len(reference_videos) + len(reference_video_assets)\n        if total_videos > limits[\"max_videos\"]:\n            raise ValueError(\n                f\"Too many reference videos: {total_videos} \"\n                f\"(videos={len(reference_videos)}, video assets={len(reference_video_assets)}). \"\n                f\"Maximum is {limits['max_videos']}.\"\n            )\n        total_audios = len(reference_audios) + len(reference_audio_assets)\n        if total_audios > limits[\"max_audios\"]:\n            raise ValueError(\n                f\"Too many reference audios: {total_audios} \"\n                f\"(audios={len(reference_audios)}, audio assets={len(reference_audio_assets)}). \"\n                f\"Maximum is {limits['max_audios']}.\"\n            )\n\n        for key in reference_images:\n            reference_images[key] = _prepare_seedance_image(reference_images[key])\n\n        has_video_input = total_videos > 0\n\n        if model.get(\"auto_downscale\") and reference_videos:","sourceCodeStart":2741,"sourceCodeEnd":2777,"githubUrl":"https://github.com/Comfy-Org/ComfyUI/blob/1c6d8d45b3693bfbb32385b410d813a7fd6be216/comfy_api_nodes/nodes_bytedance.py#L2741-L2777","documentation":"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.","triggerScenarios":"Connecting more reference video inputs than the model's max_videos, or combining reference_videos and reference_assets video ids above the cap.","commonSituations":"Multi-shot reference workflows with many clips; combining old uploaded video assets with newly connected clips.","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."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"total = len(reference_videos) + len(reference_video_assets)\nassert total <= seedance2_reference_limits(model_id)[\"max_videos\"]","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep video references to the few clips that actually carry the motion you need.","Re-check the cap when switching models."],"tags":["bytedance","seedance","validation","limits","api-nodes"],"backgroundTag":null,"analyzedSha":"1c6d8d45b3693bfbb32385b410d813a7fd6be216","analyzedAt":"2026-08-14T19:37:18.893Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}