calesthio/OpenMontage · error · ValueError
reference_to_video requires supported reference media for th
Error message
reference_to_video requires supported reference media for the selected model
What it means
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.
Source
Thrown at tools/video/atlas_video.py:251
video = inputs.get("video_url") or inputs.get("reference_video_url")
if style in {"seedance_image", "gemini_image", "h3_image"}:
if not image:
raise ValueError("image_to_video requires image_url, image_path, or reference_image_path")
payload["image"] = image
if last_image:
payload["last_image" if style == "seedance_image" else "end_image"] = last_image
elif style == "gemini_images":
if image and not images:
images = [image]
if not images:
raise ValueError("This Gemini route requires at least one reference image")
payload["images"] = images
elif style == "seedance_references":
if image and not images:
images = [image]
if not (images or videos or (audios and spec["family"] == "bytedance/seedance-2.5")):
raise ValueError("reference_to_video requires supported reference media for the selected model")
limits = spec["media_limits"]
if len(images) > limits["images"] or len(videos) > limits["videos"] or len(audios) > limits["audios"]:
raise ValueError(
f"{model} accepts at most {limits['images']} images, {limits['videos']} videos, "
f"and {limits['audios']} audio references"
)
if images:
payload["reference_images"] = images
if videos:
payload["reference_videos"] = videos
if audios:
payload["reference_audios"] = audios
elif style == "h3_refers":
refers = list(inputs.get("refers") or [])
if not refers:
refers = [
*({"url": value, "type": "image"} for value in images),
*({"url": value, "type": "video"} for value in videos),View on GitHub (pinned to 95e1c3d0ab)
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
Example fix
# before
inputs = {'model':'bytedance/seedance-2.0','prompt':'continue this scene','operation':'reference_to_video','reference_audios':['sfx.mp3']}
# after
inputs = {'model':'bytedance/seedance-2.5','prompt':'continue this scene','operation':'reference_to_video','reference_audios':['sfx.mp3']} Defensive patterns
Strategy: validation
Validate before calling
images = list(inputs.get('reference_images') or [])
videos = list(inputs.get('reference_videos') or [])
audios = list(inputs.get('reference_audios') or [])
family = atlas_video.get_info()['model_catalog'][model]['family']
if not (images or videos or (audios and family == 'bytedance/seedance-2.5')):
raise ValueError('reference_to_video needs media for this model') Type guard
def seedance_refs_ok(inputs: dict, family: str) -> bool:
return bool(inputs.get('reference_images') or inputs.get('reference_videos')
or (inputs.get('reference_audios') and family == 'bytedance/seedance-2.5')) Try / catch
try:
result = atlas_video.run(inputs=inputs)
except ValueError as e:
if 'reference_to_video requires' in str(e):
raise SystemExit('no usable reference media supplied') from e
raise Prevention
- 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
When it happens
Trigger: 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.).
Common situations: 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.
Related errors
- {model} accepts at most {limits['images']} images, {limits['
- {spec['family']} does not expose operation={operation!r}, va
- {name}={value!r} is not supported; choose one of {list(allow
- image_to_video requires image_url, image_path, or reference_
- This Gemini route requires at least one reference image
AI-assisted analysis of calesthio/OpenMontage@95e1c3d0ab (2026-08-15).
Data as JSON: /api/errors/95137573809a2e73.
Report an issue: GitHub.