Category: provider
Model Studio LivePortrait
Validation
CODEBLOCK0
Pass criteria: command exits 0 and output/aliyun-liveportrait/validate.txt is generated.
Output And Evidence
- - Save normalized request payloads, template choice, and task polling snapshots under
output/aliyun-liveportrait/. - Record the exact portrait/audio URLs and motion-strength related parameters.
Use LivePortrait when the job is lightweight portrait animation with speech audio, especially for longer clips or simpler presenter-style motion.
Critical model names
Use these exact model strings:
Selection guidance:
- - Run
liveportrait-detect first to verify the portrait image. - Use
liveportrait for the actual video generation task.
Prerequisites
- - China mainland (Beijing) only.
- Set
DASHSCOPE_API_KEY in your environment, or add dashscope_api_key to ~/.alibabacloud/credentials. - Input image and audio must be public HTTP/HTTPS URLs.
Normalized interface (video.liveportrait)
Detect Request
- -
model (string, optional): default INLINECODE10 - INLINECODE11 (string, required)
Generate Request
- -
model (string, optional): default INLINECODE13 - INLINECODE14 (string, required)
- INLINECODE15 (string, required)
- INLINECODE16 (string, optional):
normal, calm, or INLINECODE19 - INLINECODE20 (number, optional):
0 to INLINECODE22 - INLINECODE23 (int, optional):
15 to INLINECODE25 - INLINECODE26 (number, optional):
0 to INLINECODE28 - INLINECODE29 (bool, optional)
- INLINECODE30 (number, optional):
0 to INLINECODE32
Response
- -
task_id (string) - INLINECODE34 (string)
- INLINECODE35 (string, when finished)
Quick start
CODEBLOCK1
Operational guidance
- - Use a clear, front-facing portrait with low occlusion.
- Keep the audio clean and voice-dominant.
- INLINECODE36 outputs only the generated face region; keep it
true for standard talking-head output. - LivePortrait is a better fit than EMO when you need longer, simpler presenter-style clips.
Output location
- - Default output: INLINECODE38
- Override base dir with
OUTPUT_DIR.
References
技能名称: aliyun-liveportrait
详细描述:
类别: provider
Model Studio LivePortrait
验证
bash
mkdir -p output/aliyun-liveportrait
python -m pycompile skills/ai/video/aliyun-liveportrait/scripts/prepareliveportraitrequest.py && echo pycompile_ok > output/aliyun-liveportrait/validate.txt
通过条件:命令退出码为0,且生成了 output/aliyun-liveportrait/validate.txt 文件。
输出与证据
- - 将标准化请求负载、模板选择及任务轮询快照保存至 output/aliyun-liveportrait/ 目录下。
- 记录精确的人像/音频URL以及与动作强度相关的参数。
当任务为轻量级人像动画配合语音音频时,尤其是处理较长片段或更简单的演示者风格动作时,请使用LivePortrait。
关键模型名称
请使用以下精确的模型字符串:
- - liveportrait-detect
- liveportrait
选择指南:
- - 首先运行 liveportrait-detect 来验证人像图片。
- 使用 liveportrait 进行实际的视频生成任务。
前提条件
- - 仅限中国大陆(北京)区域。
- 在环境中设置 DASHSCOPEAPIKEY,或将 dashscopeapikey 添加到 ~/.alibabacloud/credentials 文件中。
- 输入的图片和音频必须是公开的HTTP/HTTPS URL。
标准化接口 (video.liveportrait)
检测请求
- - model (字符串,可选):默认为 liveportrait-detect
- image_url (字符串,必填)
生成请求
- - model (字符串,可选):默认为 liveportrait
- imageurl (字符串,必填)
- audiourl (字符串,必填)
- templateid (字符串,可选):normal、calm 或 active
- eyemovefreq (数字,可选):0 到 1
- videofps (整数,可选):15 到 30
- mouthmovestrength (数字,可选):0 到 1.5
- pasteback (布尔值,可选)
- headmove_strength (数字,可选):0 到 1
响应
- - taskid (字符串)
- taskstatus (字符串)
- video_url (字符串,任务完成时返回)
快速开始
bash
python skills/ai/video/aliyun-liveportrait/scripts/prepareliveportraitrequest.py \
--image-url https://example.com/portrait.png \
--audio-url https://example.com/speech.mp3 \
--template-id calm \
--video-fps 24 \
--paste-back
操作指南
- - 使用清晰、正面的低遮挡人像。
- 保持音频干净且以人声为主。
- paste_back=false 仅输出生成的面部区域;保持 true 以获取标准的说话人头像输出。
- 当需要更长、更简单的演示者风格片段时,LivePortrait 比 EMO 更适合。
输出位置
- - 默认输出:output/aliyun-liveportrait/request.json
- 通过 OUTPUT_DIR 覆盖基础目录。
参考资料