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.
sujaykhandekar /object-removal:6461e9e7
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 sujaykhandekar/object-removal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"sujaykhandekar/object-removal:6461e9e71603c4720a4ea2e0d5fb6290276e08c01a3ce96cb9aa4e0b6ecf4ad4",
{
input: {
image_path: "https://replicate.delivery/mgxm/7446e04a-ac99-4b2d-b671-e91b3097edf1/tv.jpg",
objects_to_remove: "tv/monitor"
}
}
);
// 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 sujaykhandekar/object-removal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"sujaykhandekar/object-removal:6461e9e71603c4720a4ea2e0d5fb6290276e08c01a3ce96cb9aa4e0b6ecf4ad4",
input={
"image_path": "https://replicate.delivery/mgxm/7446e04a-ac99-4b2d-b671-e91b3097edf1/tv.jpg",
"objects_to_remove": "tv/monitor"
}
)
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 sujaykhandekar/object-removal 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": "sujaykhandekar/object-removal:6461e9e71603c4720a4ea2e0d5fb6290276e08c01a3ce96cb9aa4e0b6ecf4ad4",
"input": {
"image_path": "https://replicate.delivery/mgxm/7446e04a-ac99-4b2d-b671-e91b3097edf1/tv.jpg",
"objects_to_remove": "tv/monitor"
}
}' \
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": "2022-05-23T05:06:49.647719Z",
"created_at": "2022-05-23T05:06:41.537771Z",
"data_removed": false,
"error": null,
"id": "kyr7n5lbszacncxc5zbyanobwi",
"input": {
"image_path": "https://replicate.delivery/mgxm/7446e04a-ac99-4b2d-b671-e91b3097edf1/tv.jpg",
"objects_to_remove": "tv/monitor"
},
"logs": "Object(s) to remove: tv/monitor\nLoading EdgeModel generator...\nLoading InpaintingModel generator...\n1 tmprqva35litv.jpg\n\nEnd test....\n/tmp/tmp2lz79osn/output.png",
"metrics": {
"predict_time": 7.893173,
"total_time": 8.109948
},
"output": "https://replicate.delivery/mgxm/0f52fcb4-b1c9-4de5-855d-7975551764ff/output.png",
"started_at": "2022-05-23T05:06:41.754546Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/kyr7n5lbszacncxc5zbyanobwi",
"cancel": "https://api.replicate.com/v1/predictions/kyr7n5lbszacncxc5zbyanobwi/cancel"
},
"version": "6461e9e71603c4720a4ea2e0d5fb6290276e08c01a3ce96cb9aa4e0b6ecf4ad4"
}
Object(s) to remove: tv/monitor
Loading EdgeModel generator...
Loading InpaintingModel generator...
1 tmprqva35litv.jpg
End test....
/tmp/tmp2lz79osn/output.png