ATH-MaaS/Pixelle-Video · error · ValueError
未知的视频生成模型: {model}
Error message
未知的视频生成模型: {model} What it means
VideoClient.generate_video dispatches to model-specific backends (_generate_wan, _generate_kling, _generate_seedance). If the model string matches none of the known branches, it raises ValueError listing the unknown model. This is a client-side guard against unsupported model names, typically caused by typos or renamed model IDs.
Source
Thrown at pixelle_video/services/api_services/video_client.py:229
duration,
shot_type,
video_ratio,
last_image_path,
first_clip_path,
reference_image_path,
reference_image_paths,
reference_video_paths,
reference_audio_path,
audio_path,
negative_prompt,
resolution,
prompt_extend,
watermark if watermark is not None else False,
seed,
audio,
)
else:
raise ValueError(f"未知的视频生成模型: {model}")
def _generate_wan(
self,
prompt: str,
image_path: Optional[str],
save_path: str,
model: str,
duration: int,
shot_type: str,
video_ratio: str,
last_image_path: Optional[str],
first_clip_path: Optional[str],
reference_image_path: Optional[str],
reference_image_paths: Optional[list[str]],
reference_video_paths: Optional[list[str]],
reference_audio_path: Optional[str],
audio_path: Optional[str],
negative_prompt: Optional[str],View on GitHub (pinned to 848b054e4f)
Solutions
- Check the exact supported model names in video_client.py's dispatch logic and use one verbatim
- If the model was renamed, use the new canonical name or a normalize_model_name-supported alias
- Update video_client.py to add a branch for the new model if it is genuinely supported by the backend
- Print/inspect the model value being passed — often it comes from config with trailing whitespace or wrong case
Example fix
// before client.generate_video(prompt, model='wan2-t2v') # ValueError: 未知的视频生成模型 // after client.generate_video(prompt, model='wan2.2-t2v-plus') # use a name the dispatcher knows
Defensive patterns
Strategy: validation
Validate before calling
SUPPORTED_MODELS = {'wan2.2-t2v-plus', 'kling-v1', 'seedance-...' } # verify against video_client.py
if model not in SUPPORTED_MODELS:
raise ValueError(f'Unsupported model: {model!r}; supported: {sorted(SUPPORTED_MODELS)}') Type guard
def is_known_model(model: object) -> bool:
return isinstance(model, str) and model in SUPPORTED_MODELS Try / catch
try:
client.generate_video(prompt, model=model)
except ValueError as e:
logging.error(f'{e} — check supported model names in video_client.py')
model = 'wan2.2-t2v-plus' # safe default Prevention
- Keep model names in a single config constant list, not inline strings
- Trim/normalize model strings (strip whitespace, lowercase) before dispatch
- Add unit tests covering every model name offered by your UI/config
- When vendors rename models, update the dispatcher and aliases together
When it happens
Trigger: Calling generate_video(prompt, model='<name>', ...) with a model string that does not match any known model (e.g. 'wan2.0', 'kling-v2', 'seedance-pro' variants not in the dispatch table).
Common situations: Typo or wrong casing in the model name; copying a model ID from vendor docs that this wrapper hasn't mapped; using an old model name after a rename; dynamically chosen model from UI config not in the supported list.
Related errors
- Template not found: {template}
- API VLM analysis requires an explicitly selected VLM model.
- ARK_API_KEY not set. Configure ARK only when using Seedream
- OPENAI_API_KEY not set. Configure OpenAI only when using GPT
- DASHSCOPE_API_KEY 未设置,无法使用图片上传服务
AI-assisted analysis of ATH-MaaS/Pixelle-Video@848b054e4f (2026-08-30).
Data as JSON: /api/errors/df2c1db69f47494c.
Report an issue: GitHub.