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.
jd7h /propainter:d7c8330f
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";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jd7h/propainter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jd7h/propainter:d7c8330f082ecf6fac577468e1cf42baf33f6d1e5928d8d943401d6ecca81b76",
{
input: {
fp16: true,
mask: "https://replicate.delivery/pbxt/Jdndmupy4eeTHSg1DhYah9QMibm70H6VWtqVbVz8qRrHBycA/mask_square.png",
mode: "video_inpainting",
video: "https://replicate.delivery/pbxt/JdndnLWcx0G4thdRI4bxJ97B9g8MHj7CN9ZQVYiTRfPBbOFW/running_car.mp4",
width: -1,
height: -1,
scale_h: 1,
scale_w: 1.2,
save_fps: 24,
raft_iter: 20,
ref_stride: 10,
resize_ratio: 1,
mask_dilation: 4,
neighbor_length: 10,
subvideo_length: 80
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
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 jd7h/propainter using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"jd7h/propainter:d7c8330f082ecf6fac577468e1cf42baf33f6d1e5928d8d943401d6ecca81b76",
input={
"fp16": True,
"mask": "https://replicate.delivery/pbxt/Jdndmupy4eeTHSg1DhYah9QMibm70H6VWtqVbVz8qRrHBycA/mask_square.png",
"mode": "video_inpainting",
"video": "https://replicate.delivery/pbxt/JdndnLWcx0G4thdRI4bxJ97B9g8MHj7CN9ZQVYiTRfPBbOFW/running_car.mp4",
"width": -1,
"height": -1,
"scale_h": 1,
"scale_w": 1.2,
"save_fps": 24,
"raft_iter": 20,
"ref_stride": 10,
"resize_ratio": 1,
"mask_dilation": 4,
"neighbor_length": 10,
"subvideo_length": 80
}
)
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 jd7h/propainter 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": "jd7h/propainter:d7c8330f082ecf6fac577468e1cf42baf33f6d1e5928d8d943401d6ecca81b76",
"input": {
"fp16": true,
"mask": "https://replicate.delivery/pbxt/Jdndmupy4eeTHSg1DhYah9QMibm70H6VWtqVbVz8qRrHBycA/mask_square.png",
"mode": "video_inpainting",
"video": "https://replicate.delivery/pbxt/JdndnLWcx0G4thdRI4bxJ97B9g8MHj7CN9ZQVYiTRfPBbOFW/running_car.mp4",
"width": -1,
"height": -1,
"scale_h": 1,
"scale_w": 1.2,
"save_fps": 24,
"raft_iter": 20,
"ref_stride": 10,
"resize_ratio": 1,
"mask_dilation": 4,
"neighbor_length": 10,
"subvideo_length": 80
}
}' \
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": "2023-10-04T13:15:00.399102Z",
"created_at": "2023-10-04T13:12:25.855623Z",
"data_removed": false,
"error": null,
"id": "3q5txz3bcwf7xuunrnltuvcfa4",
"input": {
"fp16": true,
"mask": "https://replicate.delivery/pbxt/Jdndmupy4eeTHSg1DhYah9QMibm70H6VWtqVbVz8qRrHBycA/mask_square.png",
"mode": "video_inpainting",
"video": "https://replicate.delivery/pbxt/JdndnLWcx0G4thdRI4bxJ97B9g8MHj7CN9ZQVYiTRfPBbOFW/running_car.mp4",
"width": -1,
"height": -1,
"scale_h": 1,
"scale_w": 1.2,
"save_fps": 24,
"raft_iter": 20,
"ref_stride": 10,
"resize_ratio": 1,
"mask_dilation": 4,
"neighbor_length": 10,
"subvideo_length": 80
},
"logs": "Processing: tmp4qbtep9hrunning_car [292 frames]...\n 0%| | 0/59 [00:00<?, ?it/s]\n 2%|▏ | 1/59 [00:00<00:42, 1.37it/s]\n 3%|▎ | 2/59 [00:01<00:52, 1.09it/s]\n 5%|▌ | 3/59 [00:02<00:55, 1.02it/s]\n 7%|▋ | 4/59 [00:03<00:56, 1.02s/it]\n 8%|▊ | 5/59 [00:05<00:56, 1.05s/it]\n 10%|█ | 6/59 [00:06<00:56, 1.07s/it]\n 12%|█▏ | 7/59 [00:07<00:56, 1.10s/it]\n 14%|█▎ | 8/59 [00:08<00:56, 1.11s/it]\n 15%|█▌ | 9/59 [00:09<00:56, 1.14s/it]\n 17%|█▋ | 10/59 [00:10<00:56, 1.15s/it]\n 19%|█▊ | 11/59 [00:11<00:55, 1.17s/it]\n 20%|██ | 12/59 [00:13<00:55, 1.18s/it]\n 22%|██▏ | 13/59 [00:14<00:54, 1.18s/it]\n 24%|██▎ | 14/59 [00:15<00:53, 1.18s/it]\n 25%|██▌ | 15/59 [00:16<00:52, 1.18s/it]\n 27%|██▋ | 16/59 [00:17<00:51, 1.19s/it]\n 29%|██▉ | 17/59 [00:19<00:50, 1.19s/it]\n 31%|███ | 18/59 [00:20<00:48, 1.19s/it]\n 32%|███▏ | 19/59 [00:21<00:47, 1.19s/it]\n 34%|███▍ | 20/59 [00:22<00:47, 1.21s/it]\n 36%|███▌ | 21/59 [00:23<00:45, 1.20s/it]\n 37%|███▋ | 22/59 [00:25<00:44, 1.20s/it]\n 39%|███▉ | 23/59 [00:26<00:43, 1.21s/it]\n 41%|████ | 24/59 [00:27<00:42, 1.21s/it]\n 42%|████▏ | 25/59 [00:28<00:40, 1.20s/it]\n 44%|████▍ | 26/59 [00:29<00:39, 1.20s/it]\n 46%|████▌ | 27/59 [00:31<00:38, 1.20s/it]\n 47%|████▋ | 28/59 [00:32<00:37, 1.20s/it]\n 49%|████▉ | 29/59 [00:33<00:35, 1.20s/it]\n 51%|█████ | 30/59 [00:34<00:34, 1.19s/it]\n 53%|█████▎ | 31/59 [00:35<00:33, 1.20s/it]\n 54%|█████▍ | 32/59 [00:37<00:32, 1.19s/it]\n 56%|█████▌ | 33/59 [00:38<00:31, 1.19s/it]\n 58%|█████▊ | 34/59 [00:39<00:29, 1.20s/it]\n 59%|█████▉ | 35/59 [00:40<00:28, 1.20s/it]\n 61%|██████ | 36/59 [00:41<00:27, 1.20s/it]\n 63%|██████▎ | 37/59 [00:43<00:26, 1.20s/it]\n 64%|██████▍ | 38/59 [00:44<00:25, 1.20s/it]\n 66%|██████▌ | 39/59 [00:45<00:23, 1.20s/it]\n 68%|██████▊ | 40/59 [00:46<00:22, 1.20s/it]\n 69%|██████▉ | 41/59 [00:47<00:21, 1.20s/it]\n 71%|███████ | 42/59 [00:49<00:20, 1.20s/it]\n 73%|███████▎ | 43/59 [00:50<00:19, 1.20s/it]\n 75%|███████▍ | 44/59 [00:51<00:17, 1.20s/it]\n 76%|███████▋ | 45/59 [00:52<00:16, 1.19s/it]\n 78%|███████▊ | 46/59 [00:53<00:15, 1.19s/it]\n 80%|███████▉ | 47/59 [00:55<00:14, 1.19s/it]\n 81%|████████▏ | 48/59 [00:56<00:13, 1.20s/it]\n 83%|████████▎ | 49/59 [00:57<00:11, 1.20s/it]\n 85%|████████▍ | 50/59 [00:58<00:10, 1.20s/it]\n 86%|████████▋ | 51/59 [00:59<00:09, 1.20s/it]\n 88%|████████▊ | 52/59 [01:01<00:08, 1.20s/it]\n 90%|████████▉ | 53/59 [01:02<00:07, 1.20s/it]\n 92%|█████████▏| 54/59 [01:03<00:05, 1.18s/it]\n 93%|█████████▎| 55/59 [01:04<00:04, 1.17s/it]\n 95%|█████████▍| 56/59 [01:05<00:03, 1.15s/it]\n 97%|█████████▋| 57/59 [01:06<00:02, 1.14s/it]\n 98%|█████████▊| 58/59 [01:07<00:01, 1.12s/it]\n100%|██████████| 59/59 [01:08<00:00, 1.00s/it]\n100%|██████████| 59/59 [01:08<00:00, 1.16s/it]\nIMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (972, 540) to (976, 544) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).\n[swscaler @ 0x61cff40] Warning: data is not aligned! This can lead to a speed loss\nIMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (972, 540) to (976, 544) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).\n[swscaler @ 0x709ff40] Warning: data is not aligned! This can lead to a speed loss\nAll results are saved in results/tmp4qbtep9hrunning_car",
"metrics": {
"predict_time": 153.096243,
"total_time": 154.543479
},
"output": [
"https://pbxt.replicate.delivery/1PNGO2JLndLVFNSABzLFDyOC8eXGmGhenqaeztbw6FfI1FrGB/masked_in.mp4",
"https://pbxt.replicate.delivery/4hWGPqQridaZNVNTQnXafEfNzIQDHdsNOiKqpvwpnFmTdxqRA/inpaint_out.mp4"
],
"started_at": "2023-10-04T13:12:27.302859Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/3q5txz3bcwf7xuunrnltuvcfa4",
"cancel": "https://api.replicate.com/v1/predictions/3q5txz3bcwf7xuunrnltuvcfa4/cancel"
},
"version": "d7c8330f082ecf6fac577468e1cf42baf33f6d1e5928d8d943401d6ecca81b76"
}
Processing: tmp4qbtep9hrunning_car [292 frames]...
0%| | 0/59 [00:00<?, ?it/s]
2%|▏ | 1/59 [00:00<00:42, 1.37it/s]
3%|▎ | 2/59 [00:01<00:52, 1.09it/s]
5%|▌ | 3/59 [00:02<00:55, 1.02it/s]
7%|▋ | 4/59 [00:03<00:56, 1.02s/it]
8%|▊ | 5/59 [00:05<00:56, 1.05s/it]
10%|█ | 6/59 [00:06<00:56, 1.07s/it]
12%|█▏ | 7/59 [00:07<00:56, 1.10s/it]
14%|█▎ | 8/59 [00:08<00:56, 1.11s/it]
15%|█▌ | 9/59 [00:09<00:56, 1.14s/it]
17%|█▋ | 10/59 [00:10<00:56, 1.15s/it]
19%|█▊ | 11/59 [00:11<00:55, 1.17s/it]
20%|██ | 12/59 [00:13<00:55, 1.18s/it]
22%|██▏ | 13/59 [00:14<00:54, 1.18s/it]
24%|██▎ | 14/59 [00:15<00:53, 1.18s/it]
25%|██▌ | 15/59 [00:16<00:52, 1.18s/it]
27%|██▋ | 16/59 [00:17<00:51, 1.19s/it]
29%|██▉ | 17/59 [00:19<00:50, 1.19s/it]
31%|███ | 18/59 [00:20<00:48, 1.19s/it]
32%|███▏ | 19/59 [00:21<00:47, 1.19s/it]
34%|███▍ | 20/59 [00:22<00:47, 1.21s/it]
36%|███▌ | 21/59 [00:23<00:45, 1.20s/it]
37%|███▋ | 22/59 [00:25<00:44, 1.20s/it]
39%|███▉ | 23/59 [00:26<00:43, 1.21s/it]
41%|████ | 24/59 [00:27<00:42, 1.21s/it]
42%|████▏ | 25/59 [00:28<00:40, 1.20s/it]
44%|████▍ | 26/59 [00:29<00:39, 1.20s/it]
46%|████▌ | 27/59 [00:31<00:38, 1.20s/it]
47%|████▋ | 28/59 [00:32<00:37, 1.20s/it]
49%|████▉ | 29/59 [00:33<00:35, 1.20s/it]
51%|█████ | 30/59 [00:34<00:34, 1.19s/it]
53%|█████▎ | 31/59 [00:35<00:33, 1.20s/it]
54%|█████▍ | 32/59 [00:37<00:32, 1.19s/it]
56%|█████▌ | 33/59 [00:38<00:31, 1.19s/it]
58%|█████▊ | 34/59 [00:39<00:29, 1.20s/it]
59%|█████▉ | 35/59 [00:40<00:28, 1.20s/it]
61%|██████ | 36/59 [00:41<00:27, 1.20s/it]
63%|██████▎ | 37/59 [00:43<00:26, 1.20s/it]
64%|██████▍ | 38/59 [00:44<00:25, 1.20s/it]
66%|██████▌ | 39/59 [00:45<00:23, 1.20s/it]
68%|██████▊ | 40/59 [00:46<00:22, 1.20s/it]
69%|██████▉ | 41/59 [00:47<00:21, 1.20s/it]
71%|███████ | 42/59 [00:49<00:20, 1.20s/it]
73%|███████▎ | 43/59 [00:50<00:19, 1.20s/it]
75%|███████▍ | 44/59 [00:51<00:17, 1.20s/it]
76%|███████▋ | 45/59 [00:52<00:16, 1.19s/it]
78%|███████▊ | 46/59 [00:53<00:15, 1.19s/it]
80%|███████▉ | 47/59 [00:55<00:14, 1.19s/it]
81%|████████▏ | 48/59 [00:56<00:13, 1.20s/it]
83%|████████▎ | 49/59 [00:57<00:11, 1.20s/it]
85%|████████▍ | 50/59 [00:58<00:10, 1.20s/it]
86%|████████▋ | 51/59 [00:59<00:09, 1.20s/it]
88%|████████▊ | 52/59 [01:01<00:08, 1.20s/it]
90%|████████▉ | 53/59 [01:02<00:07, 1.20s/it]
92%|█████████▏| 54/59 [01:03<00:05, 1.18s/it]
93%|█████████▎| 55/59 [01:04<00:04, 1.17s/it]
95%|█████████▍| 56/59 [01:05<00:03, 1.15s/it]
97%|█████████▋| 57/59 [01:06<00:02, 1.14s/it]
98%|█████████▊| 58/59 [01:07<00:01, 1.12s/it]
100%|██████████| 59/59 [01:08<00:00, 1.00s/it]
100%|██████████| 59/59 [01:08<00:00, 1.16s/it]
IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (972, 540) to (976, 544) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
[swscaler @ 0x61cff40] Warning: data is not aligned! This can lead to a speed loss
IMAGEIO FFMPEG_WRITER WARNING: input image is not divisible by macro_block_size=16, resizing from (972, 540) to (976, 544) to ensure video compatibility with most codecs and players. To prevent resizing, make your input image divisible by the macro_block_size or set the macro_block_size to 1 (risking incompatibility).
[swscaler @ 0x709ff40] Warning: data is not aligned! This can lead to a speed loss
All results are saved in results/tmp4qbtep9hrunning_car