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:b3e1ec85
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:b3e1ec853a25dbbd5178128139eb773612924c7f032c9919c20c254e6813a5ad",
{
input: {
fp16: true,
mask: "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
mode: "video_outpainting",
video: "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
width: -1,
height: -1,
scale_h: 1.5,
scale_w: 1.5,
save_fps: 24,
raft_iter: 20,
ref_stride: 10,
resize_ratio: 1,
mask_dilation: 4,
neighbor_length: 10,
subvideo_length: 80,
return_input_video: true
}
}
);
// 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:b3e1ec853a25dbbd5178128139eb773612924c7f032c9919c20c254e6813a5ad",
input={
"fp16": True,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mode": "video_outpainting",
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1,
"height": -1,
"scale_h": 1.5,
"scale_w": 1.5,
"save_fps": 24,
"raft_iter": 20,
"ref_stride": 10,
"resize_ratio": 1,
"mask_dilation": 4,
"neighbor_length": 10,
"subvideo_length": 80,
"return_input_video": 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 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:b3e1ec853a25dbbd5178128139eb773612924c7f032c9919c20c254e6813a5ad",
"input": {
"fp16": true,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mode": "video_outpainting",
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1,
"height": -1,
"scale_h": 1.5,
"scale_w": 1.5,
"save_fps": 24,
"raft_iter": 20,
"ref_stride": 10,
"resize_ratio": 1,
"mask_dilation": 4,
"neighbor_length": 10,
"subvideo_length": 80,
"return_input_video": 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": "2023-10-11T12:11:54.528817Z",
"created_at": "2023-10-11T12:11:34.971851Z",
"data_removed": false,
"error": null,
"id": "dcwua6tbmztk64ly52za6rt3bq",
"input": {
"fp16": true,
"mask": "https://replicate.delivery/pbxt/JgGNe7IjsavH2is00AVgbEwWroEtseid6f3HZIHI7MJH9Num/bmx-trees-mask4.mp4",
"mode": "video_outpainting",
"video": "https://replicate.delivery/pbxt/JgGNdl0r9V14YxgJ4JlsCz71rSU9y8NJD9RDDdJo2Ua3r8C7/bmx-trees2.mp4",
"width": -1,
"height": -1,
"scale_h": 1.5,
"scale_w": 1.5,
"save_fps": 24,
"raft_iter": 20,
"ref_stride": 10,
"resize_ratio": 1,
"mask_dilation": 4,
"neighbor_length": 10,
"subvideo_length": 80,
"return_input_video": true
},
"logs": "Processing: tmps59qks8dbmx-trees2 [80 frames]...\n 0%| | 0/16 [00:00<?, ?it/s]\n 6%|▋ | 1/16 [00:00<00:04, 3.10it/s]\n 12%|█▎ | 2/16 [00:00<00:06, 2.33it/s]\n 19%|█▉ | 3/16 [00:01<00:06, 2.13it/s]\n 25%|██▌ | 4/16 [00:01<00:05, 2.08it/s]\n 31%|███▏ | 5/16 [00:02<00:05, 2.02it/s]\n 38%|███▊ | 6/16 [00:02<00:04, 2.01it/s]\n 44%|████▍ | 7/16 [00:03<00:04, 1.98it/s]\n 50%|█████ | 8/16 [00:03<00:04, 1.98it/s]\n 56%|█████▋ | 9/16 [00:04<00:03, 1.97it/s]\n 62%|██████▎ | 10/16 [00:04<00:03, 1.98it/s]\n 69%|██████▉ | 11/16 [00:05<00:02, 1.96it/s]\n 75%|███████▌ | 12/16 [00:05<00:02, 1.97it/s]\n 81%|████████▏ | 13/16 [00:06<00:01, 1.95it/s]\n 88%|████████▊ | 14/16 [00:06<00:01, 1.96it/s]\n 94%|█████████▍| 15/16 [00:07<00:00, 1.95it/s]\n100%|██████████| 16/16 [00:07<00:00, 1.99it/s]\n100%|██████████| 16/16 [00:07<00:00, 2.01it/s]\nAll results are saved in results/tmps59qks8dbmx-trees2",
"metrics": {
"predict_time": 19.558862,
"total_time": 19.556966
},
"output": [
"https://pbxt.replicate.delivery/3U1GE6YIAI7sP5V6FeFHSSXM4tFt1p43Ufh5ecCHfl2kwQ0GB/masked_in.mp4",
"https://pbxt.replicate.delivery/eaH3jNUEYdyOcKue4767lY4I1epMHg1tYqg93ULng50VYIajA/inpaint_out.mp4"
],
"started_at": "2023-10-11T12:11:34.969955Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/dcwua6tbmztk64ly52za6rt3bq",
"cancel": "https://api.replicate.com/v1/predictions/dcwua6tbmztk64ly52za6rt3bq/cancel"
},
"version": "b3e1ec853a25dbbd5178128139eb773612924c7f032c9919c20c254e6813a5ad"
}
Processing: tmps59qks8dbmx-trees2 [80 frames]...
0%| | 0/16 [00:00<?, ?it/s]
6%|▋ | 1/16 [00:00<00:04, 3.10it/s]
12%|█▎ | 2/16 [00:00<00:06, 2.33it/s]
19%|█▉ | 3/16 [00:01<00:06, 2.13it/s]
25%|██▌ | 4/16 [00:01<00:05, 2.08it/s]
31%|███▏ | 5/16 [00:02<00:05, 2.02it/s]
38%|███▊ | 6/16 [00:02<00:04, 2.01it/s]
44%|████▍ | 7/16 [00:03<00:04, 1.98it/s]
50%|█████ | 8/16 [00:03<00:04, 1.98it/s]
56%|█████▋ | 9/16 [00:04<00:03, 1.97it/s]
62%|██████▎ | 10/16 [00:04<00:03, 1.98it/s]
69%|██████▉ | 11/16 [00:05<00:02, 1.96it/s]
75%|███████▌ | 12/16 [00:05<00:02, 1.97it/s]
81%|████████▏ | 13/16 [00:06<00:01, 1.95it/s]
88%|████████▊ | 14/16 [00:06<00:01, 1.96it/s]
94%|█████████▍| 15/16 [00:07<00:00, 1.95it/s]
100%|██████████| 16/16 [00:07<00:00, 1.99it/s]
100%|██████████| 16/16 [00:07<00:00, 2.01it/s]
All results are saved in results/tmps59qks8dbmx-trees2