{"record":{"id":"95137573809a2e73","repo":"calesthio/OpenMontage","slug":"reference-to-video-requires-supported-reference-me","errorCode":null,"errorMessage":"reference_to_video requires supported reference media for the selected model","messagePattern":"reference_to_video requires supported reference media for the selected model","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"tools/video/atlas_video.py","lineNumber":251,"sourceCode":"        video = inputs.get(\"video_url\") or inputs.get(\"reference_video_url\")\n\n        if style in {\"seedance_image\", \"gemini_image\", \"h3_image\"}:\n            if not image:\n                raise ValueError(\"image_to_video requires image_url, image_path, or reference_image_path\")\n            payload[\"image\"] = image\n            if last_image:\n                payload[\"last_image\" if style == \"seedance_image\" else \"end_image\"] = last_image\n        elif style == \"gemini_images\":\n            if image and not images:\n                images = [image]\n            if not images:\n                raise ValueError(\"This Gemini route requires at least one reference image\")\n            payload[\"images\"] = images\n        elif style == \"seedance_references\":\n            if image and not images:\n                images = [image]\n            if not (images or videos or (audios and spec[\"family\"] == \"bytedance/seedance-2.5\")):\n                raise ValueError(\"reference_to_video requires supported reference media for the selected model\")\n            limits = spec[\"media_limits\"]\n            if len(images) > limits[\"images\"] or len(videos) > limits[\"videos\"] or len(audios) > limits[\"audios\"]:\n                raise ValueError(\n                    f\"{model} accepts at most {limits['images']} images, {limits['videos']} videos, \"\n                    f\"and {limits['audios']} audio references\"\n                )\n            if images:\n                payload[\"reference_images\"] = images\n            if videos:\n                payload[\"reference_videos\"] = videos\n            if audios:\n                payload[\"reference_audios\"] = audios\n        elif style == \"h3_refers\":\n            refers = list(inputs.get(\"refers\") or [])\n            if not refers:\n                refers = [\n                    *({\"url\": value, \"type\": \"image\"} for value in images),\n                    *({\"url\": value, \"type\": \"video\"} for value in videos),","sourceCodeStart":233,"sourceCodeEnd":269,"githubUrl":"https://github.com/calesthio/OpenMontage/blob/95e1c3d0ab93482159818560f6a8c8e866b9139f/tools/video/atlas_video.py#L233-L269","documentation":"Raised in _build_payload for media_style=='seedance_references' when none of images, videos, or (for bytedance/seedance-2.5 only) audios were supplied. This reference_to_video route conditionally generates from any of those media lists; audio alone is accepted only on the seedance-2.5 family.","triggerScenarios":"Calling reference_to_video with prompt only; supplying audio references to a seedance-2.0-family model (audio branch is gated on family == 'bytedance/seedance-2.5'); passing media under keys the tool does not read (reference_image_urls plural-urls, etc.).","commonSituations":"Assuming audio-only conditioning works on all Seedance versions; upstream file upload silently failing so reference_images ends up empty; a wrapper dropping falsy-looking local paths.","solutions":["Include at least one entry in reference_images or reference_videos (or reference_audios if the model family is bytedance/seedance-2.5)","If audio-only was intended, switch the model to the bytedance/seedance-2.5 family id","Log the normalized inputs right before the call to confirm the media keys survived your pipeline"],"exampleFix":"# before\ninputs = {'model':'bytedance/seedance-2.0','prompt':'continue this scene','operation':'reference_to_video','reference_audios':['sfx.mp3']}\n\n# after\ninputs = {'model':'bytedance/seedance-2.5','prompt':'continue this scene','operation':'reference_to_video','reference_audios':['sfx.mp3']}","handlingStrategy":"validation","validationCode":"images = list(inputs.get('reference_images') or [])\nvideos = list(inputs.get('reference_videos') or [])\naudios = list(inputs.get('reference_audios') or [])\nfamily = atlas_video.get_info()['model_catalog'][model]['family']\nif not (images or videos or (audios and family == 'bytedance/seedance-2.5')):\n    raise ValueError('reference_to_video needs media for this model')","typeGuard":"def seedance_refs_ok(inputs: dict, family: str) -> bool:\n    return bool(inputs.get('reference_images') or inputs.get('reference_videos')\n                or (inputs.get('reference_audios') and family == 'bytedance/seedance-2.5'))","tryCatchPattern":"try:\n    result = atlas_video.run(inputs=inputs)\nexcept ValueError as e:\n    if 'reference_to_video requires' in str(e):\n        raise SystemExit('no usable reference media supplied') from e\n    raise","preventionTips":["Log normalized reference lists (with counts) just before the call","Gate audio-only workflows on the seedance-2.5 family id explicitly","Fail your upload stage loudly so empty media lists never reach the tool"],"tags":["atlas-cloud","seedance","video-generation","validation"],"backgroundTag":null,"analyzedSha":"95e1c3d0ab93482159818560f6a8c8e866b9139f","analyzedAt":"2026-08-15T06:31:20.014Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}