ATH-MaaS/Pixelle-Video · error · ValueError
DashScope video edit models require video input and may use
Error message
DashScope video edit models require video input and may use reference_image input.
What it means
For video-edit DashScope models, _build_video_edit_media needs a source video (first_clip_path) and optionally a reference image. If it returns no media, this ValueError is raised. The edit model cannot operate without a video to edit.
Source
Thrown at pixelle_video/services/api_services/video_dashscope.py:267
call_kwargs["resolution"] = resolution
if video_ratio:
call_kwargs["ratio"] = video_ratio
if prompt_extend is not None:
call_kwargs["prompt_extend"] = prompt_extend
if seed is not None:
call_kwargs["seed"] = seed
rsp = self._with_network_retry(
"submit task",
lambda: VideoSynthesis.call(**call_kwargs),
)
elif self._is_video_edit_model(model):
media = self._build_video_edit_media(
video_path=first_clip_path,
reference_image_path=reference_image_path or last_image_path or image_path,
)
if not media:
raise ValueError("DashScope video edit models require video input and may use reference_image input.")
call_kwargs = {
"api_key": self.api_key,
"model": model,
"prompt": prompt,
"media": media,
"duration": duration,
"watermark": watermark,
}
if negative_prompt:
call_kwargs["negative_prompt"] = negative_prompt
if resolution:
call_kwargs["resolution"] = resolution
if video_ratio:
call_kwargs["ratio"] = video_ratio
if prompt_extend is not None:
call_kwargs["prompt_extend"] = prompt_extend
if seed is not None:View on GitHub (pinned to 848b054e4f)
Solutions
- Provide a valid video via first_clip_path.
- Add a reference image via reference_image_path/image_path/last_image_path only as a complement — the video input is mandatory.
- Confirm the model name; if you meant first/last-frame image-to-video, pick the matching model class.
- Ensure the clip-producing step ran and set first_clip_path before this call.
Example fix
// before
client.generate_video(model="wan-video-edit", prompt=p, image_path="f.jpg")
// after
client.generate_video(model="wan-video-edit", prompt=p,
first_clip_path="clips/in.mp4",
reference_image_path="f.jpg") Defensive patterns
Strategy: validation
Validate before calling
if model_requires_edit(model) and not first_clip_path:
raise ValueError("video edit model requires first_clip_path") Type guard
def video_edit_inputs_ok(model: str, first_clip_path: str | None) -> bool:
return not model_requires_edit(model) or bool(first_clip_path) Try / catch
try:
client.generate_video(model=model, prompt=p, first_clip_path=clip)
except ValueError as e:
logger.error("video edit input missing: %s", e)
raise Prevention
- Keep a table of model families and their required inputs.
- Ensure the clip-generation stage always runs before the edit stage.
- Verify model names to avoid accidental routing into the edit branch.
- Check first_clip_path is set and the file exists before invoking.
When it happens
Trigger: _is_video_edit_model(model) is true but first_clip_path is None/empty (no video input supplied), so media ends up empty.
Common situations: Using an edit model but passing frames as image_path only; first_clip_path variable unset because the prior clip-generation step was skipped or failed; wrong model name routing a normal generation into the edit branch.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- DashScope reference-to-video models require at least one ref
- DashScope legacy video models require image_path.
- Invalid DashScope media combination: {'+'.join(sorted(media_
- 无法解析 base64 图片: {e}
- No assets provided. Please upload at least one image or vide
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/8cfe6a6f5b59bd20.
Report an issue: GitHub.