aliyun-liveportrait

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Category: provider
分类:provider

Model Studio LivePortrait

Model Studio LivePortrait

Validation

验证

bash
mkdir -p output/aliyun-liveportrait
python -m py_compile skills/ai/video/aliyun-liveportrait/scripts/prepare_liveportrait_request.py && echo "py_compile_ok" > output/aliyun-liveportrait/validate.txt
Pass criteria: command exits 0 and
output/aliyun-liveportrait/validate.txt
is generated.
bash
mkdir -p output/aliyun-liveportrait
python -m py_compile skills/ai/video/aliyun-liveportrait/scripts/prepare_liveportrait_request.py && echo "py_compile_ok" > output/aliyun-liveportrait/validate.txt
通过标准:命令退出码为0,且成功生成
output/aliyun-liveportrait/validate.txt
文件。

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.
  • 请将标准化请求负载、模板选择结果和任务轮询快照保存至
    output/aliyun-liveportrait/
    目录下。
  • 记录准确的肖像/音频URL以及动效强度相关参数。
当任务为带语音音频的轻量级肖像动画,尤其是生成长片段或更简单的主持人风格动效时,适合使用LivePortrait。

Critical model names

关键模型名称

Use these exact model strings:
  • liveportrait-detect
  • liveportrait
Selection guidance:
  • Run
    liveportrait-detect
    first to verify the portrait image.
  • Use
    liveportrait
    for the actual video generation task.
请使用以下准确的模型字符串:
  • liveportrait-detect
  • liveportrait
选择指南:
  • 首先运行
    liveportrait-detect
    来校验肖像图片。
  • 使用
    liveportrait
    执行实际的视频生成任务。

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.
  • 仅支持中国大陆(北京)区域使用。
  • 请在环境变量中设置
    DASHSCOPE_API_KEY
    ,或将
    dashscope_api_key
    添加至
    ~/.alibabacloud/credentials
    文件中。
  • 输入的图片和音频必须是公开可访问的HTTP/HTTPS URL。

Normalized interface (video.liveportrait)

标准化接口(video.liveportrait)

Detect Request

检测请求

  • model
    (string, optional): default
    liveportrait-detect
  • image_url
    (string, required)
  • model
    (字符串,可选):默认值为
    liveportrait-detect
  • image_url
    (字符串,必填)

Generate Request

生成请求

  • model
    (string, optional): default
    liveportrait
  • image_url
    (string, required)
  • audio_url
    (string, required)
  • template_id
    (string, optional):
    normal
    ,
    calm
    , or
    active
  • eye_move_freq
    (number, optional):
    0
    to
    1
  • video_fps
    (int, optional):
    15
    to
    30
  • mouth_move_strength
    (number, optional):
    0
    to
    1.5
  • paste_back
    (bool, optional)
  • head_move_strength
    (number, optional):
    0
    to
    1
  • model
    (字符串,可选):默认值为
    liveportrait
  • image_url
    (字符串,必填)
  • audio_url
    (字符串,必填)
  • template_id
    (字符串,可选):可选值为
    normal
    calm
    active
  • eye_move_freq
    (数值,可选):取值范围
    0
    1
  • video_fps
    (整数,可选):取值范围
    15
    30
  • mouth_move_strength
    (数值,可选):取值范围
    0
    1.5
  • paste_back
    (布尔值,可选)
  • head_move_strength
    (数值,可选):取值范围
    0
    1

Response

返回结果

  • task_id
    (string)
  • task_status
    (string)
  • video_url
    (string, when finished)
  • task_id
    (字符串)
  • task_status
    (字符串)
  • video_url
    (字符串,任务完成时返回)

Quick start

快速开始

bash
python skills/ai/video/aliyun-liveportrait/scripts/prepare_liveportrait_request.py \
  --image-url "https://example.com/portrait.png" \
  --audio-url "https://example.com/speech.mp3" \
  --template-id calm \
  --video-fps 24 \
  --paste-back
bash
python skills/ai/video/aliyun-liveportrait/scripts/prepare_liveportrait_request.py \
  --image-url "https://example.com/portrait.png" \
  --audio-url "https://example.com/speech.mp3" \
  --template-id calm \
  --video-fps 24 \
  --paste-back

Operational guidance

使用指南

  • Use a clear, front-facing portrait with low occlusion.
  • Keep the audio clean and voice-dominant.
  • paste_back=false
    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.
  • 请使用清晰、低遮挡的正面肖像图片。
  • 请使用干净、以人声为主的音频。
  • paste_back=false
    时仅输出生成的人脸区域;如需标准的说话人肖像输出,请将其设置为
    true
  • 当你需要生成长时长、更简单的主持人风格片段时,相比EMO,LivePortrait是更合适的选择。

Output location

输出路径

  • Default output:
    output/aliyun-liveportrait/request.json
  • Override base dir with
    OUTPUT_DIR
    .
  • 默认输出路径:
    output/aliyun-liveportrait/request.json
  • 可通过
    OUTPUT_DIR
    环境变量覆盖基础目录。

References

参考文档

  • references/sources.md
  • references/sources.md