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.
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/JuynKj9IO2816Mi6Ik3ynj37p9pj3eQypTf0rUjZIhsjL09t/Screenshot%202023-11-21%20at%202.40.57%20PM.png",
seed: 0,
image: "https://replicate.delivery/pbxt/JuynKtxWiFnpNEFIcz1UoWHb6WIJUuilToxGyn9ARsks5RR1/totebag.png",
prompt: "illustration of takashi murakami colored tiger in bag",
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/JuynKj9IO2816Mi6Ik3ynj37p9pj3eQypTf0rUjZIhsjL09t/Screenshot%202023-11-21%20at%202.40.57%20PM.png",
"seed": 0,
"image": "https://replicate.delivery/pbxt/JuynKtxWiFnpNEFIcz1UoWHb6WIJUuilToxGyn9ARsks5RR1/totebag.png",
"prompt": "illustration of takashi murakami colored tiger in bag",
"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/JuynKj9IO2816Mi6Ik3ynj37p9pj3eQypTf0rUjZIhsjL09t/Screenshot%202023-11-21%20at%202.40.57%20PM.png",
"seed": 0,
"image": "https://replicate.delivery/pbxt/JuynKtxWiFnpNEFIcz1UoWHb6WIJUuilToxGyn9ARsks5RR1/totebag.png",
"prompt": "illustration of takashi murakami colored tiger in bag",
"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-21T23:41:03.877909Z",
"created_at": "2023-11-21T23:40:54.050533Z",
"data_removed": false,
"error": null,
"id": "pbl5bxlb6svhssnqkqwyxsauwm",
"input": {
"mask": "https://replicate.delivery/pbxt/JuynKj9IO2816Mi6Ik3ynj37p9pj3eQypTf0rUjZIhsjL09t/Screenshot%202023-11-21%20at%202.40.57%20PM.png",
"seed": 0,
"image": "https://replicate.delivery/pbxt/JuynKtxWiFnpNEFIcz1UoWHb6WIJUuilToxGyn9ARsks5RR1/totebag.png",
"prompt": "illustration of takashi murakami colored tiger in bag",
"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: 3991\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.45it/s]\n 4%|▎ | 7/200 [00:00<00:08, 23.73it/s]\n 5%|▌ | 10/200 [00:00<00:07, 25.25it/s]\n 6%|▋ | 13/200 [00:00<00:07, 26.05it/s]\n 8%|▊ | 16/200 [00:00<00:06, 26.54it/s]\n 10%|▉ | 19/200 [00:00<00:06, 26.80it/s]\n 11%|█ | 22/200 [00:00<00:06, 26.96it/s]\n 12%|█▎ | 25/200 [00:00<00:06, 27.10it/s]\n 14%|█▍ | 28/200 [00:01<00:06, 27.18it/s]\n 16%|█▌ | 31/200 [00:01<00:06, 27.21it/s]\n 17%|█▋ | 34/200 [00:01<00:06, 27.26it/s]\n 18%|█▊ | 37/200 [00:01<00:05, 27.28it/s]\n 20%|██ | 40/200 [00:01<00:05, 27.32it/s]\n 22%|██▏ | 43/200 [00:01<00:05, 27.33it/s]\n 23%|██▎ | 46/200 [00:01<00:05, 27.32it/s]\n 24%|██▍ | 49/200 [00:01<00:05, 27.30it/s]\n 26%|██▌ | 52/200 [00:01<00:05, 27.30it/s]\n 28%|██▊ | 55/200 [00:02<00:05, 27.27it/s]\n 29%|██▉ | 58/200 [00:02<00:05, 27.27it/s]\n 30%|███ | 61/200 [00:02<00:05, 27.27it/s]\n 32%|███▏ | 64/200 [00:02<00:04, 27.28it/s]\n 34%|███▎ | 67/200 [00:02<00:04, 27.28it/s]\n 35%|███▌ | 70/200 [00:02<00:04, 27.31it/s]\n 36%|███▋ | 73/200 [00:02<00:04, 27.31it/s]\n 38%|███▊ | 76/200 [00:02<00:04, 27.34it/s]\n 40%|███▉ | 79/200 [00:02<00:04, 27.35it/s]\n 41%|████ | 82/200 [00:03<00:04, 27.33it/s]\n 42%|████▎ | 85/200 [00:03<00:04, 27.37it/s]\n 44%|████▍ | 88/200 [00:03<00:04, 27.33it/s]\n 46%|████▌ | 91/200 [00:03<00:03, 27.34it/s]\n 47%|████▋ | 94/200 [00:03<00:03, 27.27it/s]\n 48%|████▊ | 97/200 [00:03<00:03, 27.27it/s]\n 50%|█████ | 100/200 [00:03<00:03, 27.30it/s]\n 52%|█████▏ | 103/200 [00:03<00:03, 27.32it/s]\n 53%|█████▎ | 106/200 [00:03<00:03, 27.32it/s]\n 55%|█████▍ | 109/200 [00:04<00:03, 27.33it/s]\n 56%|█████▌ | 112/200 [00:04<00:03, 27.34it/s]\n 57%|█████▊ | 115/200 [00:04<00:03, 27.34it/s]\n 59%|█████▉ | 118/200 [00:04<00:03, 27.30it/s]\n 60%|██████ | 121/200 [00:04<00:02, 27.25it/s]\n 62%|██████▏ | 124/200 [00:04<00:02, 27.27it/s]\n 64%|██████▎ | 127/200 [00:04<00:02, 27.28it/s]\n 65%|██████▌ | 130/200 [00:04<00:02, 27.24it/s]\n 66%|██████▋ | 133/200 [00:04<00:02, 27.26it/s]\n 68%|██████▊ | 136/200 [00:05<00:02, 27.23it/s]\n 70%|██████▉ | 139/200 [00:05<00:02, 27.19it/s]\n 71%|███████ | 142/200 [00:05<00:02, 27.16it/s]\n 72%|███████▎ | 145/200 [00:05<00:02, 27.18it/s]\n 74%|███████▍ | 148/200 [00:05<00:01, 27.18it/s]\n 76%|███████▌ | 151/200 [00:05<00:01, 27.21it/s]\n 77%|███████▋ | 154/200 [00:05<00:01, 27.19it/s]\n 78%|███████▊ | 157/200 [00:05<00:01, 27.19it/s]\n 80%|████████ | 160/200 [00:05<00:01, 27.22it/s]\n 82%|████████▏ | 163/200 [00:06<00:01, 27.22it/s]\n 83%|████████▎ | 166/200 [00:06<00:01, 27.22it/s]\n 84%|████████▍ | 169/200 [00:06<00:01, 27.17it/s]\n 86%|████████▌ | 172/200 [00:06<00:01, 27.17it/s]\n 88%|████████▊ | 175/200 [00:06<00:00, 27.18it/s]\n 89%|████████▉ | 178/200 [00:06<00:00, 27.22it/s]\n 90%|█████████ | 181/200 [00:06<00:00, 27.23it/s]\n 92%|█████████▏| 184/200 [00:06<00:00, 27.23it/s]\n 94%|█████████▎| 187/200 [00:06<00:00, 27.24it/s]\n 95%|█████████▌| 190/200 [00:07<00:00, 27.25it/s]\n 96%|█████████▋| 193/200 [00:07<00:00, 27.25it/s]\n 98%|█████████▊| 196/200 [00:07<00:00, 27.24it/s]\n100%|█████████▉| 199/200 [00:07<00:00, 27.27it/s]\n100%|██████████| 200/200 [00:07<00:00, 27.05it/s]\nPrediction complete",
"metrics": {
"predict_time": 9.796392,
"total_time": 9.827376
},
"output": [
"https://replicate.delivery/pbxt/7weLwx38AYXeoUH1dsYtLifrHrTVLkWB1vTPK2VEYdkdQeqHB/out-0.png"
],
"started_at": "2023-11-21T23:40:54.081517Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/pbl5bxlb6svhssnqkqwyxsauwm",
"cancel": "https://api.replicate.com/v1/predictions/pbl5bxlb6svhssnqkqwyxsauwm/cancel"
},
"version": "062d8ed6016c7bf957101afbe2d279b5698a6b822def8d592a36a5efdf372752"
}
Using seed: 3991
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.45it/s]
4%|▎ | 7/200 [00:00<00:08, 23.73it/s]
5%|▌ | 10/200 [00:00<00:07, 25.25it/s]
6%|▋ | 13/200 [00:00<00:07, 26.05it/s]
8%|▊ | 16/200 [00:00<00:06, 26.54it/s]
10%|▉ | 19/200 [00:00<00:06, 26.80it/s]
11%|█ | 22/200 [00:00<00:06, 26.96it/s]
12%|█▎ | 25/200 [00:00<00:06, 27.10it/s]
14%|█▍ | 28/200 [00:01<00:06, 27.18it/s]
16%|█▌ | 31/200 [00:01<00:06, 27.21it/s]
17%|█▋ | 34/200 [00:01<00:06, 27.26it/s]
18%|█▊ | 37/200 [00:01<00:05, 27.28it/s]
20%|██ | 40/200 [00:01<00:05, 27.32it/s]
22%|██▏ | 43/200 [00:01<00:05, 27.33it/s]
23%|██▎ | 46/200 [00:01<00:05, 27.32it/s]
24%|██▍ | 49/200 [00:01<00:05, 27.30it/s]
26%|██▌ | 52/200 [00:01<00:05, 27.30it/s]
28%|██▊ | 55/200 [00:02<00:05, 27.27it/s]
29%|██▉ | 58/200 [00:02<00:05, 27.27it/s]
30%|███ | 61/200 [00:02<00:05, 27.27it/s]
32%|███▏ | 64/200 [00:02<00:04, 27.28it/s]
34%|███▎ | 67/200 [00:02<00:04, 27.28it/s]
35%|███▌ | 70/200 [00:02<00:04, 27.31it/s]
36%|███▋ | 73/200 [00:02<00:04, 27.31it/s]
38%|███▊ | 76/200 [00:02<00:04, 27.34it/s]
40%|███▉ | 79/200 [00:02<00:04, 27.35it/s]
41%|████ | 82/200 [00:03<00:04, 27.33it/s]
42%|████▎ | 85/200 [00:03<00:04, 27.37it/s]
44%|████▍ | 88/200 [00:03<00:04, 27.33it/s]
46%|████▌ | 91/200 [00:03<00:03, 27.34it/s]
47%|████▋ | 94/200 [00:03<00:03, 27.27it/s]
48%|████▊ | 97/200 [00:03<00:03, 27.27it/s]
50%|█████ | 100/200 [00:03<00:03, 27.30it/s]
52%|█████▏ | 103/200 [00:03<00:03, 27.32it/s]
53%|█████▎ | 106/200 [00:03<00:03, 27.32it/s]
55%|█████▍ | 109/200 [00:04<00:03, 27.33it/s]
56%|█████▌ | 112/200 [00:04<00:03, 27.34it/s]
57%|█████▊ | 115/200 [00:04<00:03, 27.34it/s]
59%|█████▉ | 118/200 [00:04<00:03, 27.30it/s]
60%|██████ | 121/200 [00:04<00:02, 27.25it/s]
62%|██████▏ | 124/200 [00:04<00:02, 27.27it/s]
64%|██████▎ | 127/200 [00:04<00:02, 27.28it/s]
65%|██████▌ | 130/200 [00:04<00:02, 27.24it/s]
66%|██████▋ | 133/200 [00:04<00:02, 27.26it/s]
68%|██████▊ | 136/200 [00:05<00:02, 27.23it/s]
70%|██████▉ | 139/200 [00:05<00:02, 27.19it/s]
71%|███████ | 142/200 [00:05<00:02, 27.16it/s]
72%|███████▎ | 145/200 [00:05<00:02, 27.18it/s]
74%|███████▍ | 148/200 [00:05<00:01, 27.18it/s]
76%|███████▌ | 151/200 [00:05<00:01, 27.21it/s]
77%|███████▋ | 154/200 [00:05<00:01, 27.19it/s]
78%|███████▊ | 157/200 [00:05<00:01, 27.19it/s]
80%|████████ | 160/200 [00:05<00:01, 27.22it/s]
82%|████████▏ | 163/200 [00:06<00:01, 27.22it/s]
83%|████████▎ | 166/200 [00:06<00:01, 27.22it/s]
84%|████████▍ | 169/200 [00:06<00:01, 27.17it/s]
86%|████████▌ | 172/200 [00:06<00:01, 27.17it/s]
88%|████████▊ | 175/200 [00:06<00:00, 27.18it/s]
89%|████████▉ | 178/200 [00:06<00:00, 27.22it/s]
90%|█████████ | 181/200 [00:06<00:00, 27.23it/s]
92%|█████████▏| 184/200 [00:06<00:00, 27.23it/s]
94%|█████████▎| 187/200 [00:06<00:00, 27.24it/s]
95%|█████████▌| 190/200 [00:07<00:00, 27.25it/s]
96%|█████████▋| 193/200 [00:07<00:00, 27.25it/s]
98%|█████████▊| 196/200 [00:07<00:00, 27.24it/s]
100%|█████████▉| 199/200 [00:07<00:00, 27.27it/s]
100%|██████████| 200/200 [00:07<00:00, 27.05it/s]
Prediction complete