Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
mbukerepo /live-portrait:55392f84
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run mbukerepo/live-portrait using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"mbukerepo/live-portrait:55392f840e8bfdc7af4d6139c67b6e713725e2b51dca63b53b499717902ea584",
{
input: {
flag_pasteback: true,
input_image_path: "https://replicate.delivery/pbxt/LENuJxQtTDy21AqLGeIPFR2aWRMUvUUIuzlMWqGAuDQS2T9Y/s9.jpg",
input_video_path: "https://replicate.delivery/pbxt/LENuJTpAkCkWI1pYnnV8hKJjC1jjUBzw8X6lHt111cliA4WV/d2.mp4",
flag_do_crop_input: true,
flag_relative_input: true
}
}
);
// 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.
pip install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run mbukerepo/live-portrait using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"mbukerepo/live-portrait:55392f840e8bfdc7af4d6139c67b6e713725e2b51dca63b53b499717902ea584",
input={
"flag_pasteback": True,
"input_image_path": "https://replicate.delivery/pbxt/LENuJxQtTDy21AqLGeIPFR2aWRMUvUUIuzlMWqGAuDQS2T9Y/s9.jpg",
"input_video_path": "https://replicate.delivery/pbxt/LENuJTpAkCkWI1pYnnV8hKJjC1jjUBzw8X6lHt111cliA4WV/d2.mp4",
"flag_do_crop_input": True,
"flag_relative_input": True
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run mbukerepo/live-portrait 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": "mbukerepo/live-portrait:55392f840e8bfdc7af4d6139c67b6e713725e2b51dca63b53b499717902ea584",
"input": {
"flag_pasteback": true,
"input_image_path": "https://replicate.delivery/pbxt/LENuJxQtTDy21AqLGeIPFR2aWRMUvUUIuzlMWqGAuDQS2T9Y/s9.jpg",
"input_video_path": "https://replicate.delivery/pbxt/LENuJTpAkCkWI1pYnnV8hKJjC1jjUBzw8X6lHt111cliA4WV/d2.mp4",
"flag_do_crop_input": true,
"flag_relative_input": true
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
{
"completed_at": "2024-07-08T06:56:53.473924Z",
"created_at": "2024-07-08T06:55:30.010000Z",
"data_removed": false,
"error": null,
"id": "f317x2t6v9rgg0cgj4gb2sb9sr",
"input": {
"flag_pasteback": true,
"input_image_path": "https://replicate.delivery/pbxt/LENuJxQtTDy21AqLGeIPFR2aWRMUvUUIuzlMWqGAuDQS2T9Y/s9.jpg",
"input_video_path": "https://replicate.delivery/pbxt/LENuJTpAkCkWI1pYnnV8hKJjC1jjUBzw8X6lHt111cliA4WV/d2.mp4",
"flag_do_crop_input": true,
"flag_relative_input": true
},
"logs": "[06:56:47] Load source image from live_portrait_pipeline.py:46\n/tmp/tmpdv2p6edks9.jpg\n/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/nn/modules/conv.py:456: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:919.)\nreturn F.conv2d(input, weight, bias, self.stride,\n[06:56:50] Load from video file (mp4 mov avi live_portrait_pipeline.py:72\netc...): /tmp/tmptlq05lfad2.mp4\n/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/nn/modules/conv.py:605: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:919.)\nreturn F.conv3d(\nAnimating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00\nConcatenating result... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00\nDump to /tmp/tmpdv2p6edks9--tmptlq05lfad2_concat.mp4\nDump to /tmp/tmpdv2p6edks9--tmptlq05lfad2.mp4",
"metrics": {
"predict_time": 6.680969105,
"total_time": 83.463924
},
"output": "https://replicate.delivery/pbxt/lZw5ir274ZadNZltYlOOtmdO3e6qSJIv574ozcyOpNOafTGTA/tmpdv2p6edks9--tmptlq05lfad2.mp4",
"started_at": "2024-07-08T06:56:46.792955Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/f317x2t6v9rgg0cgj4gb2sb9sr",
"cancel": "https://api.replicate.com/v1/predictions/f317x2t6v9rgg0cgj4gb2sb9sr/cancel"
},
"version": "55392f840e8bfdc7af4d6139c67b6e713725e2b51dca63b53b499717902ea584"
}
[06:56:47] Load source image from live_portrait_pipeline.py:46
/tmp/tmpdv2p6edks9.jpg
/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/nn/modules/conv.py:456: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:919.)
return F.conv2d(input, weight, bias, self.stride,
[06:56:50] Load from video file (mp4 mov avi live_portrait_pipeline.py:72
etc...): /tmp/tmptlq05lfad2.mp4
/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/nn/modules/conv.py:605: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:919.)
return F.conv3d(
Animating... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Concatenating result... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
Dump to /tmp/tmpdv2p6edks9--tmptlq05lfad2_concat.mp4
Dump to /tmp/tmpdv2p6edks9--tmptlq05lfad2.mp4