- Third-party
Pruna 的 P-Video-Animate 接收一段源视频和一张主体参考图像,然后使用源视频中的动作和音频为参考主体生成动画。
| 模型信息 | |
|---|---|
| 更多信息 | 链接 ↗ |
| 定价 | 在 Cloudflare 仪表板中查看定价 ↗ |
用法
const response = await env.AI.run(
'pruna/p-video-animate',
{
video: 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4',
image: 'https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg',
resolution: '720p',
target_fps: 'original',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "pruna/p-video-animate",
"input": {
"video": "https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4",
"image": "https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg",
"resolution": "720p",
"target_fps": "original"
}
}'{
"state": "Completed",
"result": {
"video": "https://examples.aig.cloudflare.com/pruna/p-video-animate/motion-transfer.mp4"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}参数
video
stringrequired用作动作和音频来源的源 RGB 视频(.mp4)。HTTP(S) URL 或 data URI。image
stringrequired要生成动画的主体参考图像。HTTP(S) URL 或 data URI。turbo
booleanrequireddefault: falseTurbo 模式:生成速度更快,质量略低。resolution
stringrequireddefault: 720penum: 720p, 1080p目标分辨率。save_audio
booleanrequireddefault: true保存带音频的视频。ignore_audio
booleanrequireddefault: false生成过程中忽略源音频。target_fps
stringrequireddefault: originalenum: 24, 48, original工作视频的目标帧率(FPS)。instruction_prompt
stringrequireddefault: 关于如何为参考主体生成动画的进一步指令。seed
integerminimum: -9007199254740991maximum: 9007199254740991用于结果可复现生成的随机种子。disable_safety_checker
booleanrequireddefault: false对生成的视频禁用安全检查器。video
stringformat: uri动画视频的预签名 URL。