You're looking at a specific version of this model. Jump to the model overview.
yuni-eng /inpainting:062d8ed6
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 yuni-eng/inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"yuni-eng/inpainting:062d8ed6016c7bf957101afbe2d279b5698a6b822def8d592a36a5efdf372752",
{
input: {
mask: "https://replicate.delivery/pbxt/JuydgV8lA1U9R1xKiTVxO5PMCXUoYpOP3VxdLbMHIcNkY1nY/mask.png",
seed: 0,
image: "https://replicate.delivery/pbxt/JuydgiKU8Dnu68VP1C5yNMwqM7i0eD55I8uQQJMfdR3hUgxN/billboard.png",
prompt: "realistic photo of golden shoes, no text in billboard",
num_outputs: 1,
guidance_scale: 20,
negative_prompt: "poorly drawn hands, poorly drawn feet, poorly drawn face, poorly drawn eyes, extra limbs, disfigured, deformed, bad anatomy, distorted text, incorrect text spelling",
num_inference_steps: 200
}
}
);
// 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 yuni-eng/inpainting using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"yuni-eng/inpainting:062d8ed6016c7bf957101afbe2d279b5698a6b822def8d592a36a5efdf372752",
input={
"mask": "https://replicate.delivery/pbxt/JuydgV8lA1U9R1xKiTVxO5PMCXUoYpOP3VxdLbMHIcNkY1nY/mask.png",
"seed": 0,
"image": "https://replicate.delivery/pbxt/JuydgiKU8Dnu68VP1C5yNMwqM7i0eD55I8uQQJMfdR3hUgxN/billboard.png",
"prompt": "realistic photo of golden shoes, no text in billboard",
"num_outputs": 1,
"guidance_scale": 20,
"negative_prompt": "poorly drawn hands, poorly drawn feet, poorly drawn face, poorly drawn eyes, extra limbs, disfigured, deformed, bad anatomy, distorted text, incorrect text spelling",
"num_inference_steps": 200
}
)
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 yuni-eng/inpainting 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": "yuni-eng/inpainting:062d8ed6016c7bf957101afbe2d279b5698a6b822def8d592a36a5efdf372752",
"input": {
"mask": "https://replicate.delivery/pbxt/JuydgV8lA1U9R1xKiTVxO5PMCXUoYpOP3VxdLbMHIcNkY1nY/mask.png",
"seed": 0,
"image": "https://replicate.delivery/pbxt/JuydgiKU8Dnu68VP1C5yNMwqM7i0eD55I8uQQJMfdR3hUgxN/billboard.png",
"prompt": "realistic photo of golden shoes, no text in billboard",
"num_outputs": 1,
"guidance_scale": 20,
"negative_prompt": "poorly drawn hands, poorly drawn feet, poorly drawn face, poorly drawn eyes, extra limbs, disfigured, deformed, bad anatomy, distorted text, incorrect text spelling",
"num_inference_steps": 200
}
}' \
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-11-21T22:38:26.086118Z",
"created_at": "2023-11-21T22:38:16.635887Z",
"data_removed": false,
"error": null,
"id": "6s5oculbvlyayrpgbc7gkr2u34",
"input": {
"mask": "https://replicate.delivery/pbxt/JuydgV8lA1U9R1xKiTVxO5PMCXUoYpOP3VxdLbMHIcNkY1nY/mask.png",
"seed": 0,
"image": "https://replicate.delivery/pbxt/JuydgiKU8Dnu68VP1C5yNMwqM7i0eD55I8uQQJMfdR3hUgxN/billboard.png",
"prompt": "realistic photo of golden shoes, no text in billboard",
"num_outputs": 1,
"guidance_scale": 20,
"negative_prompt": "poorly drawn hands, poorly drawn feet, poorly drawn face, poorly drawn eyes, extra limbs, disfigured, deformed, bad anatomy, distorted text, incorrect text spelling",
"num_inference_steps": 200
},
"logs": "Using seed: 15078\n 0%| | 0/200 [00:00<?, ?it/s]\n 0%| | 1/200 [00:00<00:20, 9.73it/s]\n 2%|▏ | 4/200 [00:00<00:09, 20.27it/s]\n 4%|▎ | 7/200 [00:00<00:08, 23.44it/s]\n 5%|▌ | 10/200 [00:00<00:07, 24.91it/s]\n 6%|▋ | 13/200 [00:00<00:07, 25.67it/s]\n 8%|▊ | 16/200 [00:00<00:07, 26.06it/s]\n 10%|▉ | 19/200 [00:00<00:06, 26.39it/s]\n 11%|█ | 22/200 [00:00<00:06, 26.64it/s]\n 12%|█▎ | 25/200 [00:00<00:06, 26.72it/s]\n 14%|█▍ | 28/200 [00:01<00:06, 26.84it/s]\n 16%|█▌ | 31/200 [00:01<00:06, 26.94it/s]\n 17%|█▋ | 34/200 [00:01<00:06, 26.97it/s]\n 18%|█▊ | 37/200 [00:01<00:06, 27.05it/s]\n 20%|██ | 40/200 [00:01<00:05, 27.06it/s]\n 22%|██▏ | 43/200 [00:01<00:05, 27.08it/s]\n 23%|██▎ | 46/200 [00:01<00:05, 27.09it/s]\n 24%|██▍ | 49/200 [00:01<00:05, 27.13it/s]\n 26%|██▌ | 52/200 [00:01<00:05, 27.12it/s]\n 28%|██▊ | 55/200 [00:02<00:05, 27.13it/s]\n 29%|██▉ | 58/200 [00:02<00:05, 27.10it/s]\n 30%|███ | 61/200 [00:02<00:05, 27.10it/s]\n 32%|███▏ | 64/200 [00:02<00:05, 27.10it/s]\n 34%|███▎ | 67/200 [00:02<00:04, 27.09it/s]\n 35%|███▌ | 70/200 [00:02<00:04, 27.10it/s]\n 36%|███▋ | 73/200 [00:02<00:04, 27.09it/s]\n 38%|███▊ | 76/200 [00:02<00:04, 27.11it/s]\n 40%|███▉ | 79/200 [00:02<00:04, 27.13it/s]\n 41%|████ | 82/200 [00:03<00:04, 27.18it/s]\n 42%|████▎ | 85/200 [00:03<00:04, 27.21it/s]\n 44%|████▍ | 88/200 [00:03<00:04, 27.28it/s]\n 46%|████▌ | 91/200 [00:03<00:03, 27.28it/s]\n 47%|████▋ | 94/200 [00:03<00:03, 27.29it/s]\n 48%|████▊ | 97/200 [00:03<00:03, 27.28it/s]\n 50%|█████ | 100/200 [00:03<00:03, 27.29it/s]\n 52%|█████▏ | 103/200 [00:03<00:03, 27.25it/s]\n 53%|█████▎ | 106/200 [00:03<00:03, 27.29it/s]\n 55%|█████▍ | 109/200 [00:04<00:03, 27.27it/s]\n 56%|█████▌ | 112/200 [00:04<00:03, 27.26it/s]\n 57%|█████▊ | 115/200 [00:04<00:03, 27.24it/s]\n 59%|█████▉ | 118/200 [00:04<00:03, 27.25it/s]\n 60%|██████ | 121/200 [00:04<00:02, 27.26it/s]\n 62%|██████▏ | 124/200 [00:04<00:02, 27.29it/s]\n 64%|██████▎ | 127/200 [00:04<00:02, 27.27it/s]\n 65%|██████▌ | 130/200 [00:04<00:02, 27.27it/s]\n 66%|██████▋ | 133/200 [00:04<00:02, 27.28it/s]\n 68%|██████▊ | 136/200 [00:05<00:02, 27.30it/s]\n 70%|██████▉ | 139/200 [00:05<00:02, 27.27it/s]\n 71%|███████ | 142/200 [00:05<00:02, 27.30it/s]\n 72%|███████▎ | 145/200 [00:05<00:02, 27.25it/s]\n 74%|███████▍ | 148/200 [00:05<00:01, 27.24it/s]\n 76%|███████▌ | 151/200 [00:05<00:01, 27.24it/s]\n 77%|███████▋ | 154/200 [00:05<00:01, 27.28it/s]\n 78%|███████▊ | 157/200 [00:05<00:01, 27.26it/s]\n 80%|████████ | 160/200 [00:05<00:01, 27.27it/s]\n 82%|████████▏ | 163/200 [00:06<00:01, 27.27it/s]\n 83%|████████▎ | 166/200 [00:06<00:01, 27.27it/s]\n 84%|████████▍ | 169/200 [00:06<00:01, 27.27it/s]\n 86%|████████▌ | 172/200 [00:06<00:01, 27.29it/s]\n 88%|████████▊ | 175/200 [00:06<00:00, 27.28it/s]\n 89%|████████▉ | 178/200 [00:06<00:00, 27.30it/s]\n 90%|█████████ | 181/200 [00:06<00:00, 27.29it/s]\n 92%|█████████▏| 184/200 [00:06<00:00, 27.29it/s]\n 94%|█████████▎| 187/200 [00:06<00:00, 27.27it/s]\n 95%|█████████▌| 190/200 [00:07<00:00, 27.28it/s]\n 96%|█████████▋| 193/200 [00:07<00:00, 27.26it/s]\n 98%|█████████▊| 196/200 [00:07<00:00, 27.29it/s]\n100%|█████████▉| 199/200 [00:07<00:00, 27.24it/s]\n100%|██████████| 200/200 [00:07<00:00, 26.96it/s]\nPrediction complete",
"metrics": {
"predict_time": 9.383412,
"total_time": 9.450231
},
"output": [
"https://replicate.delivery/pbxt/vDyJdsMz3orfUaCUvxFQPwPHrchopZmNtV7Srish0O3wGX9IA/out-0.png"
],
"started_at": "2023-11-21T22:38:16.702706Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/6s5oculbvlyayrpgbc7gkr2u34",
"cancel": "https://api.replicate.com/v1/predictions/6s5oculbvlyayrpgbc7gkr2u34/cancel"
},
"version": "062d8ed6016c7bf957101afbe2d279b5698a6b822def8d592a36a5efdf372752"
}
Using seed: 15078
0%| | 0/200 [00:00<?, ?it/s]
0%| | 1/200 [00:00<00:20, 9.73it/s]
2%|▏ | 4/200 [00:00<00:09, 20.27it/s]
4%|▎ | 7/200 [00:00<00:08, 23.44it/s]
5%|▌ | 10/200 [00:00<00:07, 24.91it/s]
6%|▋ | 13/200 [00:00<00:07, 25.67it/s]
8%|▊ | 16/200 [00:00<00:07, 26.06it/s]
10%|▉ | 19/200 [00:00<00:06, 26.39it/s]
11%|█ | 22/200 [00:00<00:06, 26.64it/s]
12%|█▎ | 25/200 [00:00<00:06, 26.72it/s]
14%|█▍ | 28/200 [00:01<00:06, 26.84it/s]
16%|█▌ | 31/200 [00:01<00:06, 26.94it/s]
17%|█▋ | 34/200 [00:01<00:06, 26.97it/s]
18%|█▊ | 37/200 [00:01<00:06, 27.05it/s]
20%|██ | 40/200 [00:01<00:05, 27.06it/s]
22%|██▏ | 43/200 [00:01<00:05, 27.08it/s]
23%|██▎ | 46/200 [00:01<00:05, 27.09it/s]
24%|██▍ | 49/200 [00:01<00:05, 27.13it/s]
26%|██▌ | 52/200 [00:01<00:05, 27.12it/s]
28%|██▊ | 55/200 [00:02<00:05, 27.13it/s]
29%|██▉ | 58/200 [00:02<00:05, 27.10it/s]
30%|███ | 61/200 [00:02<00:05, 27.10it/s]
32%|███▏ | 64/200 [00:02<00:05, 27.10it/s]
34%|███▎ | 67/200 [00:02<00:04, 27.09it/s]
35%|███▌ | 70/200 [00:02<00:04, 27.10it/s]
36%|███▋ | 73/200 [00:02<00:04, 27.09it/s]
38%|███▊ | 76/200 [00:02<00:04, 27.11it/s]
40%|███▉ | 79/200 [00:02<00:04, 27.13it/s]
41%|████ | 82/200 [00:03<00:04, 27.18it/s]
42%|████▎ | 85/200 [00:03<00:04, 27.21it/s]
44%|████▍ | 88/200 [00:03<00:04, 27.28it/s]
46%|████▌ | 91/200 [00:03<00:03, 27.28it/s]
47%|████▋ | 94/200 [00:03<00:03, 27.29it/s]
48%|████▊ | 97/200 [00:03<00:03, 27.28it/s]
50%|█████ | 100/200 [00:03<00:03, 27.29it/s]
52%|█████▏ | 103/200 [00:03<00:03, 27.25it/s]
53%|█████▎ | 106/200 [00:03<00:03, 27.29it/s]
55%|█████▍ | 109/200 [00:04<00:03, 27.27it/s]
56%|█████▌ | 112/200 [00:04<00:03, 27.26it/s]
57%|█████▊ | 115/200 [00:04<00:03, 27.24it/s]
59%|█████▉ | 118/200 [00:04<00:03, 27.25it/s]
60%|██████ | 121/200 [00:04<00:02, 27.26it/s]
62%|██████▏ | 124/200 [00:04<00:02, 27.29it/s]
64%|██████▎ | 127/200 [00:04<00:02, 27.27it/s]
65%|██████▌ | 130/200 [00:04<00:02, 27.27it/s]
66%|██████▋ | 133/200 [00:04<00:02, 27.28it/s]
68%|██████▊ | 136/200 [00:05<00:02, 27.30it/s]
70%|██████▉ | 139/200 [00:05<00:02, 27.27it/s]
71%|███████ | 142/200 [00:05<00:02, 27.30it/s]
72%|███████▎ | 145/200 [00:05<00:02, 27.25it/s]
74%|███████▍ | 148/200 [00:05<00:01, 27.24it/s]
76%|███████▌ | 151/200 [00:05<00:01, 27.24it/s]
77%|███████▋ | 154/200 [00:05<00:01, 27.28it/s]
78%|███████▊ | 157/200 [00:05<00:01, 27.26it/s]
80%|████████ | 160/200 [00:05<00:01, 27.27it/s]
82%|████████▏ | 163/200 [00:06<00:01, 27.27it/s]
83%|████████▎ | 166/200 [00:06<00:01, 27.27it/s]
84%|████████▍ | 169/200 [00:06<00:01, 27.27it/s]
86%|████████▌ | 172/200 [00:06<00:01, 27.29it/s]
88%|████████▊ | 175/200 [00:06<00:00, 27.28it/s]
89%|████████▉ | 178/200 [00:06<00:00, 27.30it/s]
90%|█████████ | 181/200 [00:06<00:00, 27.29it/s]
92%|█████████▏| 184/200 [00:06<00:00, 27.29it/s]
94%|█████████▎| 187/200 [00:06<00:00, 27.27it/s]
95%|█████████▌| 190/200 [00:07<00:00, 27.28it/s]
96%|█████████▋| 193/200 [00:07<00:00, 27.26it/s]
98%|█████████▊| 196/200 [00:07<00:00, 27.29it/s]
100%|█████████▉| 199/200 [00:07<00:00, 27.24it/s]
100%|██████████| 200/200 [00:07<00:00, 26.96it/s]
Prediction complete