buddhiraz / liveportraitv1
- Public
- 95 runs
-
T4
Prediction
buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44ID6pzr1cxsk1rge0cgncgadn8zb4StatusSucceededSourceWebHardwareT4Total durationCreatedInput
- flag_pasteback
- input_video_path
- flag_do_crop_input
- flag_relative_input
- live_portrait_dsize
- 512
- live_portrait_scale
- 2.3
- video_frame_load_cap
- 128
- live_portrait_lip_zero
- live_portrait_relative
- live_portrait_vx_ratio
- 0
- live_portrait_vy_ratio
- -0.12
- live_portrait_stitching
- video_select_every_n_frames
- 1
- live_portrait_eye_retargeting
- live_portrait_lip_retargeting
- live_portrait_lip_retargeting_multiplier
- 1
- live_portrait_eyes_retargeting_multiplier
- 1
{ "flag_pasteback": true, "input_image_path": "https://replicate.delivery/pbxt/LGB1V0Go9Y9Y1V7AlaHoTSd9rHOuL2gLrdX3ODQ3ufZg534Q/Screenshot%20from%202024-07-13%2013-34-56.png", "input_video_path": "https://replicate.delivery/pbxt/LGB1UzqdJrSQofGXe1cbFZwtC5W7bE9kRxNenkFIqi7Uwkcb/d11.mp4", "flag_do_crop_input": true, "flag_relative_input": true, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": true, "live_portrait_relative": true, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": true, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": false, "live_portrait_lip_retargeting": false, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run buddhiraz/liveportraitv1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44", { input: { flag_pasteback: true, input_image_path: "https://replicate.delivery/pbxt/LGB1V0Go9Y9Y1V7AlaHoTSd9rHOuL2gLrdX3ODQ3ufZg534Q/Screenshot%20from%202024-07-13%2013-34-56.png", input_video_path: "https://replicate.delivery/pbxt/LGB1UzqdJrSQofGXe1cbFZwtC5W7bE9kRxNenkFIqi7Uwkcb/d11.mp4", flag_do_crop_input: true, flag_relative_input: true, live_portrait_dsize: 512, live_portrait_scale: 2.3, video_frame_load_cap: 128, live_portrait_lip_zero: true, live_portrait_relative: true, live_portrait_vx_ratio: 0, live_portrait_vy_ratio: -0.12, live_portrait_stitching: true, video_select_every_n_frames: 1, live_portrait_eye_retargeting: false, live_portrait_lip_retargeting: false, live_portrait_lip_retargeting_multiplier: 1, live_portrait_eyes_retargeting_multiplier: 1 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run buddhiraz/liveportraitv1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44", input={ "flag_pasteback": True, "input_image_path": "https://replicate.delivery/pbxt/LGB1V0Go9Y9Y1V7AlaHoTSd9rHOuL2gLrdX3ODQ3ufZg534Q/Screenshot%20from%202024-07-13%2013-34-56.png", "input_video_path": "https://replicate.delivery/pbxt/LGB1UzqdJrSQofGXe1cbFZwtC5W7bE9kRxNenkFIqi7Uwkcb/d11.mp4", "flag_do_crop_input": True, "flag_relative_input": True, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": True, "live_portrait_relative": True, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": True, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": False, "live_portrait_lip_retargeting": False, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run buddhiraz/liveportraitv1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44", "input": { "flag_pasteback": true, "input_image_path": "https://replicate.delivery/pbxt/LGB1V0Go9Y9Y1V7AlaHoTSd9rHOuL2gLrdX3ODQ3ufZg534Q/Screenshot%20from%202024-07-13%2013-34-56.png", "input_video_path": "https://replicate.delivery/pbxt/LGB1UzqdJrSQofGXe1cbFZwtC5W7bE9kRxNenkFIqi7Uwkcb/d11.mp4", "flag_do_crop_input": true, "flag_relative_input": true, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": true, "live_portrait_relative": true, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": true, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": false, "live_portrait_lip_retargeting": false, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-07-13T08:09:50.337144Z", "created_at": "2024-07-13T08:06:07Z", "data_removed": false, "error": null, "id": "6pzr1cxsk1rge0cgncgadn8zb4", "input": { "flag_pasteback": true, "input_image_path": "https://replicate.delivery/pbxt/LGB1V0Go9Y9Y1V7AlaHoTSd9rHOuL2gLrdX3ODQ3ufZg534Q/Screenshot%20from%202024-07-13%2013-34-56.png", "input_video_path": "https://replicate.delivery/pbxt/LGB1UzqdJrSQofGXe1cbFZwtC5W7bE9kRxNenkFIqi7Uwkcb/d11.mp4", "flag_do_crop_input": true, "flag_relative_input": true, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": true, "live_portrait_relative": true, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": true, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": false, "live_portrait_lip_retargeting": false, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 }, "logs": "[08:08:54] Load source image from live_portrait_pipeline.py:49\n/tmp/tmp_x71gl0sScreenshot from\n2024-07-13 13-34-56.png\ntensor([[[[0.0667, 0.0667, 0.0627, ..., 0.0000, 0.0000, 0.0000],\n[0.5490, 0.4941, 0.4392, ..., 0.0000, 0.0000, 0.0000],\n[0.6549, 0.6510, 0.6471, ..., 0.0000, 0.0000, 0.0000],\n...,\n[0.6667, 0.6588, 0.6588, ..., 0.9569, 0.9529, 0.9451],\n[0.6510, 0.6431, 0.6431, ..., 0.9569, 0.9490, 0.9412],\n[0.6392, 0.6353, 0.6314, ..., 0.9529, 0.9373, 0.9294]],\n[[0.1059, 0.1059, 0.1059, ..., 0.0000, 0.0000, 0.0000],\n[0.6275, 0.5765, 0.5216, ..., 0.0000, 0.0000, 0.0000],\n[0.7451, 0.7490, 0.7490, ..., 0.0000, 0.0000, 0.0000],\n...,\n[0.6941, 0.6863, 0.6863, ..., 0.9765, 0.9725, 0.9608],\n[0.6745, 0.6706, 0.6706, ..., 0.9686, 0.9608, 0.9490],\n[0.6588, 0.6549, 0.6510, ..., 0.9569, 0.9412, 0.9294]],\n[[0.1294, 0.1294, 0.1294, ..., 0.0000, 0.0000, 0.0000],\n[0.2980, 0.2706, 0.2510, ..., 0.0000, 0.0000, 0.0000],\n[0.3294, 0.3216, 0.3098, ..., 0.0000, 0.0000, 0.0000],\n...,\n[0.7216, 0.7176, 0.7137, ..., 0.7490, 0.7373, 0.7294],\n[0.7059, 0.7020, 0.7020, ..., 0.7922, 0.7765, 0.7608],\n[0.6980, 0.6941, 0.6863, ..., 0.8431, 0.8196, 0.8000]]]],\ndevice='cuda:0')\n[08:08:56] Load video: /tmp/tmpavfmo_e8d11.mp4 live_portrait_pipeline.py:99\nThe FPS of /tmp/tmpavfmo_e8d11.mp4 is: live_portrait_pipeline.py:104\n25\nLoad video file (mp4 mov avi etc...): live_portrait_pipeline.py:106\n/tmp/tmpavfmo_e8d11.mp4\n[08:08:57] Start making motion template... live_portrait_pipeline.py:110\nMaking motion templates... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:03\n[08:09:02] Dump motion template to live_portrait_pipeline.py:127\n/tmp/tmpavfmo_e8d11.pkl\n[08:09:03] Prepared pasteback mask done. live_portrait_pipeline.py:139\n🚀Animating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:34\nConcatenating result... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:01\n[08:09:44] Video with audio generated successfully: video.py:197\n/tmp/tmp_x71gl0sScreenshot from 2024-07-13\n13-34-56--tmpavfmo_e8d11_concat_with_audio.mp4\nReplace /tmp/tmp_x71gl0sScreenshot from live_portrait_pipeline.py:230\n2024-07-13\n13-34-56--tmpavfmo_e8d11_concat.mp4\nwith /tmp/tmp_x71gl0sScreenshot from\n2024-07-13\n13-34-56--tmpavfmo_e8d11_concat_with_au\ndio.mp4\n[swscaler @ 0x5c54240] Warning: data is not aligned! This can lead to a speed loss\n[08:09:49] Video with audio generated successfully: video.py:197\n/tmp/tmp_x71gl0sScreenshot from 2024-07-13\n13-34-56--tmpavfmo_e8d11_with_audio.mp4\nReplace /tmp/tmp_x71gl0sScreenshot from live_portrait_pipeline.py:244\n2024-07-13 13-34-56--tmpavfmo_e8d11.mp4\nwith /tmp/tmp_x71gl0sScreenshot from\n2024-07-13\n13-34-56--tmpavfmo_e8d11_with_audio.mp4\nAnimated template: live_portrait_pipeline.py:248\n/tmp/tmpavfmo_e8d11.pkl, you can\nspecify `-d` argument with this\ntemplate path next time to avoid\ncropping video, motion making and\nprotecting privacy.\nAnimated video: live_portrait_pipeline.py:249\n/tmp/tmp_x71gl0sScreenshot from\n2024-07-13 13-34-56--tmpavfmo_e8d11.mp4\nAnimated video with concact: live_portrait_pipeline.py:250\n/tmp/tmp_x71gl0sScreenshot from\n2024-07-13\n13-34-56--tmpavfmo_e8d11_concat.mp4", "metrics": { "predict_time": 56.437219257, "total_time": 223.337144 }, "output": "https://replicate.delivery/czjl/43Aa4ik5US40DRBofwRWPF1QQigxesz1rZOcxReMbW4cC9PmA/tmp_x71gl0sScreenshot%20from%202024-07-13%2013-34-56--tmpavfmo_e8d11.mp4", "started_at": "2024-07-13T08:08:53.899924Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/6pzr1cxsk1rge0cgncgadn8zb4", "cancel": "https://api.replicate.com/v1/predictions/6pzr1cxsk1rge0cgncgadn8zb4/cancel" }, "version": "8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44" }
Generated in[08:08:54] Load source image from live_portrait_pipeline.py:49 /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56.png tensor([[[[0.0667, 0.0667, 0.0627, ..., 0.0000, 0.0000, 0.0000], [0.5490, 0.4941, 0.4392, ..., 0.0000, 0.0000, 0.0000], [0.6549, 0.6510, 0.6471, ..., 0.0000, 0.0000, 0.0000], ..., [0.6667, 0.6588, 0.6588, ..., 0.9569, 0.9529, 0.9451], [0.6510, 0.6431, 0.6431, ..., 0.9569, 0.9490, 0.9412], [0.6392, 0.6353, 0.6314, ..., 0.9529, 0.9373, 0.9294]], [[0.1059, 0.1059, 0.1059, ..., 0.0000, 0.0000, 0.0000], [0.6275, 0.5765, 0.5216, ..., 0.0000, 0.0000, 0.0000], [0.7451, 0.7490, 0.7490, ..., 0.0000, 0.0000, 0.0000], ..., [0.6941, 0.6863, 0.6863, ..., 0.9765, 0.9725, 0.9608], [0.6745, 0.6706, 0.6706, ..., 0.9686, 0.9608, 0.9490], [0.6588, 0.6549, 0.6510, ..., 0.9569, 0.9412, 0.9294]], [[0.1294, 0.1294, 0.1294, ..., 0.0000, 0.0000, 0.0000], [0.2980, 0.2706, 0.2510, ..., 0.0000, 0.0000, 0.0000], [0.3294, 0.3216, 0.3098, ..., 0.0000, 0.0000, 0.0000], ..., [0.7216, 0.7176, 0.7137, ..., 0.7490, 0.7373, 0.7294], [0.7059, 0.7020, 0.7020, ..., 0.7922, 0.7765, 0.7608], [0.6980, 0.6941, 0.6863, ..., 0.8431, 0.8196, 0.8000]]]], device='cuda:0') [08:08:56] Load video: /tmp/tmpavfmo_e8d11.mp4 live_portrait_pipeline.py:99 The FPS of /tmp/tmpavfmo_e8d11.mp4 is: live_portrait_pipeline.py:104 25 Load video file (mp4 mov avi etc...): live_portrait_pipeline.py:106 /tmp/tmpavfmo_e8d11.mp4 [08:08:57] Start making motion template... live_portrait_pipeline.py:110 Making motion templates... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:03 [08:09:02] Dump motion template to live_portrait_pipeline.py:127 /tmp/tmpavfmo_e8d11.pkl [08:09:03] Prepared pasteback mask done. live_portrait_pipeline.py:139 🚀Animating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:34 Concatenating result... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:01 [08:09:44] Video with audio generated successfully: video.py:197 /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56--tmpavfmo_e8d11_concat_with_audio.mp4 Replace /tmp/tmp_x71gl0sScreenshot from live_portrait_pipeline.py:230 2024-07-13 13-34-56--tmpavfmo_e8d11_concat.mp4 with /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56--tmpavfmo_e8d11_concat_with_au dio.mp4 [swscaler @ 0x5c54240] Warning: data is not aligned! This can lead to a speed loss [08:09:49] Video with audio generated successfully: video.py:197 /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56--tmpavfmo_e8d11_with_audio.mp4 Replace /tmp/tmp_x71gl0sScreenshot from live_portrait_pipeline.py:244 2024-07-13 13-34-56--tmpavfmo_e8d11.mp4 with /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56--tmpavfmo_e8d11_with_audio.mp4 Animated template: live_portrait_pipeline.py:248 /tmp/tmpavfmo_e8d11.pkl, you can specify `-d` argument with this template path next time to avoid cropping video, motion making and protecting privacy. Animated video: live_portrait_pipeline.py:249 /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56--tmpavfmo_e8d11.mp4 Animated video with concact: live_portrait_pipeline.py:250 /tmp/tmp_x71gl0sScreenshot from 2024-07-13 13-34-56--tmpavfmo_e8d11_concat.mp4
Prediction
buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44Input
- flag_pasteback
- input_video_path
- flag_do_crop_input
- flag_relative_input
- live_portrait_dsize
- 512
- live_portrait_scale
- 2.3
- video_frame_load_cap
- 128
- live_portrait_lip_zero
- live_portrait_relative
- live_portrait_vx_ratio
- 0
- live_portrait_vy_ratio
- -0.12
- live_portrait_stitching
- video_select_every_n_frames
- 1
- live_portrait_eye_retargeting
- live_portrait_lip_retargeting
- live_portrait_lip_retargeting_multiplier
- 1
- live_portrait_eyes_retargeting_multiplier
- 1
{ "flag_pasteback": true, "input_image_path": "https://replicate.delivery/pbxt/LFzuXbwINYxNv26erUHNYNR85H3hROWAHbnR2nCsfhf4YHzA/Screenshot%20from%202024-07-08%2014-50-41.png", "input_video_path": "https://replicate.delivery/pbxt/LFzuXFbzMx12AJnrrpRNqXuwDXpTCEoLajXvo1LC3GSCFlHk/d14.mp4", "flag_do_crop_input": true, "flag_relative_input": true, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": true, "live_portrait_relative": true, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": true, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": false, "live_portrait_lip_retargeting": false, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run buddhiraz/liveportraitv1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44", { input: { flag_pasteback: true, input_image_path: "https://replicate.delivery/pbxt/LFzuXbwINYxNv26erUHNYNR85H3hROWAHbnR2nCsfhf4YHzA/Screenshot%20from%202024-07-08%2014-50-41.png", input_video_path: "https://replicate.delivery/pbxt/LFzuXFbzMx12AJnrrpRNqXuwDXpTCEoLajXvo1LC3GSCFlHk/d14.mp4", flag_do_crop_input: true, flag_relative_input: true, live_portrait_dsize: 512, live_portrait_scale: 2.3, video_frame_load_cap: 128, live_portrait_lip_zero: true, live_portrait_relative: true, live_portrait_vx_ratio: 0, live_portrait_vy_ratio: -0.12, live_portrait_stitching: true, video_select_every_n_frames: 1, live_portrait_eye_retargeting: false, live_portrait_lip_retargeting: false, live_portrait_lip_retargeting_multiplier: 1, live_portrait_eyes_retargeting_multiplier: 1 } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run buddhiraz/liveportraitv1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44", input={ "flag_pasteback": True, "input_image_path": "https://replicate.delivery/pbxt/LFzuXbwINYxNv26erUHNYNR85H3hROWAHbnR2nCsfhf4YHzA/Screenshot%20from%202024-07-08%2014-50-41.png", "input_video_path": "https://replicate.delivery/pbxt/LFzuXFbzMx12AJnrrpRNqXuwDXpTCEoLajXvo1LC3GSCFlHk/d14.mp4", "flag_do_crop_input": True, "flag_relative_input": True, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": True, "live_portrait_relative": True, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": True, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": False, "live_portrait_lip_retargeting": False, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run buddhiraz/liveportraitv1 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "buddhiraz/liveportraitv1:8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44", "input": { "flag_pasteback": true, "input_image_path": "https://replicate.delivery/pbxt/LFzuXbwINYxNv26erUHNYNR85H3hROWAHbnR2nCsfhf4YHzA/Screenshot%20from%202024-07-08%2014-50-41.png", "input_video_path": "https://replicate.delivery/pbxt/LFzuXFbzMx12AJnrrpRNqXuwDXpTCEoLajXvo1LC3GSCFlHk/d14.mp4", "flag_do_crop_input": true, "flag_relative_input": true, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": true, "live_portrait_relative": true, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": true, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": false, "live_portrait_lip_retargeting": false, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Output
{ "completed_at": "2024-07-12T20:03:30.837862Z", "created_at": "2024-07-12T19:59:01.656000Z", "data_removed": false, "error": null, "id": "rhc3tdge31rga0cgn23t55h0p4", "input": { "flag_pasteback": true, "input_image_path": "https://replicate.delivery/pbxt/LFzuXbwINYxNv26erUHNYNR85H3hROWAHbnR2nCsfhf4YHzA/Screenshot%20from%202024-07-08%2014-50-41.png", "input_video_path": "https://replicate.delivery/pbxt/LFzuXFbzMx12AJnrrpRNqXuwDXpTCEoLajXvo1LC3GSCFlHk/d14.mp4", "flag_do_crop_input": true, "flag_relative_input": true, "live_portrait_dsize": 512, "live_portrait_scale": 2.3, "video_frame_load_cap": 128, "live_portrait_lip_zero": true, "live_portrait_relative": true, "live_portrait_vx_ratio": 0, "live_portrait_vy_ratio": -0.12, "live_portrait_stitching": true, "video_select_every_n_frames": 1, "live_portrait_eye_retargeting": false, "live_portrait_lip_retargeting": false, "live_portrait_lip_retargeting_multiplier": 1, "live_portrait_eyes_retargeting_multiplier": 1 }, "logs": "[20:01:27] Load source image from live_portrait_pipeline.py:49\n/tmp/tmpbuvf7ptkScreenshot from\n2024-07-08 14-50-41.png\ntensor([[[[0.7059, 0.9490, 0.9451, ..., 0.0039, 0.0039, 0.0000],\n[0.5098, 0.9059, 0.9529, ..., 0.0078, 0.0039, 0.0000],\n[0.5765, 0.8824, 0.9725, ..., 0.0039, 0.0000, 0.0000],\n...,\n[0.8980, 0.8824, 0.7686, ..., 0.8471, 0.8471, 0.8353],\n[0.8902, 0.8392, 0.6667, ..., 0.8431, 0.8471, 0.8353],\n[0.8588, 0.7412, 0.5020, ..., 0.8157, 0.8392, 0.8392]],\n[[0.7333, 0.9725, 0.9725, ..., 0.0392, 0.0471, 0.0471],\n[0.5373, 0.9333, 0.9804, ..., 0.0431, 0.0471, 0.0471],\n[0.6039, 0.9098, 0.9961, ..., 0.0471, 0.0471, 0.0471],\n...,\n[0.7020, 0.7176, 0.6392, ..., 0.6745, 0.6863, 0.6863],\n[0.6980, 0.6706, 0.5373, ..., 0.6706, 0.6863, 0.6902],\n[0.6902, 0.6078, 0.4118, ..., 0.6431, 0.6745, 0.6902]],\n[[0.7333, 0.9725, 0.9725, ..., 0.0353, 0.0392, 0.0392],\n[0.5373, 0.9333, 0.9765, ..., 0.0392, 0.0392, 0.0392],\n[0.6039, 0.9098, 0.9961, ..., 0.0353, 0.0353, 0.0353],\n...,\n[0.5765, 0.5922, 0.5176, ..., 0.4706, 0.4824, 0.4745],\n[0.5725, 0.5490, 0.4235, ..., 0.4706, 0.4824, 0.4784],\n[0.5843, 0.5176, 0.3294, ..., 0.4431, 0.4706, 0.4824]]]],\ndevice='cuda:0')\n[20:01:29] Load video: /tmp/tmpqda7wxbqd14.mp4 live_portrait_pipeline.py:99\nThe FPS of /tmp/tmpqda7wxbqd14.mp4 is: live_portrait_pipeline.py:104\n30\nLoad video file (mp4 mov avi etc...): live_portrait_pipeline.py:106\n/tmp/tmpqda7wxbqd14.mp4\n[20:01:31] Start making motion template... live_portrait_pipeline.py:110\nMaking motion templates... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:09\n[20:01:48] Dump motion template to live_portrait_pipeline.py:127\n/tmp/tmpqda7wxbqd14.pkl\nPrepared pasteback mask done. live_portrait_pipeline.py:139\n🚀Animating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:17\nConcatenating result... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:03\n[20:03:20] Video with audio generated successfully: video.py:197\n/tmp/tmpbuvf7ptkScreenshot from 2024-07-08\n14-50-41--tmpqda7wxbqd14_concat_with_audio.mp4\nReplace /tmp/tmpbuvf7ptkScreenshot from live_portrait_pipeline.py:230\n2024-07-08\n14-50-41--tmpqda7wxbqd14_concat.mp4\nwith /tmp/tmpbuvf7ptkScreenshot from\n2024-07-08\n14-50-41--tmpqda7wxbqd14_concat_with_au\ndio.mp4\n[swscaler @ 0x568f240] Warning: data is not aligned! This can lead to a speed loss\n[20:03:30] Video with audio generated successfully: video.py:197\n/tmp/tmpbuvf7ptkScreenshot from 2024-07-08\n14-50-41--tmpqda7wxbqd14_with_audio.mp4\nReplace /tmp/tmpbuvf7ptkScreenshot from live_portrait_pipeline.py:244\n2024-07-08 14-50-41--tmpqda7wxbqd14.mp4\nwith /tmp/tmpbuvf7ptkScreenshot from\n2024-07-08\n14-50-41--tmpqda7wxbqd14_with_audio.mp4\nAnimated template: live_portrait_pipeline.py:248\n/tmp/tmpqda7wxbqd14.pkl, you can\nspecify `-d` argument with this\ntemplate path next time to avoid\ncropping video, motion making and\nprotecting privacy.\nAnimated video: live_portrait_pipeline.py:249\n/tmp/tmpbuvf7ptkScreenshot from\n2024-07-08 14-50-41--tmpqda7wxbqd14.mp4\nAnimated video with concact: live_portrait_pipeline.py:250\n/tmp/tmpbuvf7ptkScreenshot from\n2024-07-08\n14-50-41--tmpqda7wxbqd14_concat.mp4", "metrics": { "predict_time": 123.935499453, "total_time": 269.181862 }, "output": "https://replicate.delivery/czjl/nei1zWuTBvTNJapC71F83epbK6GtHkbyHN9H8xhMlGrS4zHTA/tmpbuvf7ptkScreenshot%20from%202024-07-08%2014-50-41--tmpqda7wxbqd14.mp4", "started_at": "2024-07-12T20:01:26.902362Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/rhc3tdge31rga0cgn23t55h0p4", "cancel": "https://api.replicate.com/v1/predictions/rhc3tdge31rga0cgn23t55h0p4/cancel" }, "version": "8514ed7670d55e3e4811ee4003bb1741c15b583380a40e711833eadb988d2f44" }
Generated in[20:01:27] Load source image from live_portrait_pipeline.py:49 /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41.png tensor([[[[0.7059, 0.9490, 0.9451, ..., 0.0039, 0.0039, 0.0000], [0.5098, 0.9059, 0.9529, ..., 0.0078, 0.0039, 0.0000], [0.5765, 0.8824, 0.9725, ..., 0.0039, 0.0000, 0.0000], ..., [0.8980, 0.8824, 0.7686, ..., 0.8471, 0.8471, 0.8353], [0.8902, 0.8392, 0.6667, ..., 0.8431, 0.8471, 0.8353], [0.8588, 0.7412, 0.5020, ..., 0.8157, 0.8392, 0.8392]], [[0.7333, 0.9725, 0.9725, ..., 0.0392, 0.0471, 0.0471], [0.5373, 0.9333, 0.9804, ..., 0.0431, 0.0471, 0.0471], [0.6039, 0.9098, 0.9961, ..., 0.0471, 0.0471, 0.0471], ..., [0.7020, 0.7176, 0.6392, ..., 0.6745, 0.6863, 0.6863], [0.6980, 0.6706, 0.5373, ..., 0.6706, 0.6863, 0.6902], [0.6902, 0.6078, 0.4118, ..., 0.6431, 0.6745, 0.6902]], [[0.7333, 0.9725, 0.9725, ..., 0.0353, 0.0392, 0.0392], [0.5373, 0.9333, 0.9765, ..., 0.0392, 0.0392, 0.0392], [0.6039, 0.9098, 0.9961, ..., 0.0353, 0.0353, 0.0353], ..., [0.5765, 0.5922, 0.5176, ..., 0.4706, 0.4824, 0.4745], [0.5725, 0.5490, 0.4235, ..., 0.4706, 0.4824, 0.4784], [0.5843, 0.5176, 0.3294, ..., 0.4431, 0.4706, 0.4824]]]], device='cuda:0') [20:01:29] Load video: /tmp/tmpqda7wxbqd14.mp4 live_portrait_pipeline.py:99 The FPS of /tmp/tmpqda7wxbqd14.mp4 is: live_portrait_pipeline.py:104 30 Load video file (mp4 mov avi etc...): live_portrait_pipeline.py:106 /tmp/tmpqda7wxbqd14.mp4 [20:01:31] Start making motion template... live_portrait_pipeline.py:110 Making motion templates... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:09 [20:01:48] Dump motion template to live_portrait_pipeline.py:127 /tmp/tmpqda7wxbqd14.pkl Prepared pasteback mask done. live_portrait_pipeline.py:139 🚀Animating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:01:17 Concatenating result... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:03 [20:03:20] Video with audio generated successfully: video.py:197 /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41--tmpqda7wxbqd14_concat_with_audio.mp4 Replace /tmp/tmpbuvf7ptkScreenshot from live_portrait_pipeline.py:230 2024-07-08 14-50-41--tmpqda7wxbqd14_concat.mp4 with /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41--tmpqda7wxbqd14_concat_with_au dio.mp4 [swscaler @ 0x568f240] Warning: data is not aligned! This can lead to a speed loss [20:03:30] Video with audio generated successfully: video.py:197 /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41--tmpqda7wxbqd14_with_audio.mp4 Replace /tmp/tmpbuvf7ptkScreenshot from live_portrait_pipeline.py:244 2024-07-08 14-50-41--tmpqda7wxbqd14.mp4 with /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41--tmpqda7wxbqd14_with_audio.mp4 Animated template: live_portrait_pipeline.py:248 /tmp/tmpqda7wxbqd14.pkl, you can specify `-d` argument with this template path next time to avoid cropping video, motion making and protecting privacy. Animated video: live_portrait_pipeline.py:249 /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41--tmpqda7wxbqd14.mp4 Animated video with concact: live_portrait_pipeline.py:250 /tmp/tmpbuvf7ptkScreenshot from 2024-07-08 14-50-41--tmpqda7wxbqd14_concat.mp4
Want to make some of these yourself?
Run this model