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/bb86697a-187f-459d-a288-6ccc65f1fe19/cowduck.jpeg",
objects_to_remove: "cow"
}
}
);
// 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/bb86697a-187f-459d-a288-6ccc65f1fe19/cowduck.jpeg",
"objects_to_remove": "cow"
}
)
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/bb86697a-187f-459d-a288-6ccc65f1fe19/cowduck.jpeg",
"objects_to_remove": "cow"
}
}' \
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:00:36.400523Z",
"created_at": "2022-05-23T05:00:28.989611Z",
"data_removed": false,
"error": null,
"id": "phakdbkwp5cutp3iwpo7rntxyu",
"input": {
"image_path": "https://replicate.delivery/mgxm/bb86697a-187f-459d-a288-6ccc65f1fe19/cowduck.jpeg",
"objects_to_remove": "cow"
},
"logs": "Object(s) to remove: cow\nLoading EdgeModel generator...\nLoading InpaintingModel generator...\n1 tmp5j980blccowduck.jpeg\n\nEnd test....\n/tmp/tmp28908qfi/output.png",
"metrics": {
"predict_time": 7.199208,
"total_time": 7.410912
},
"output": "https://replicate.delivery/mgxm/2f323d28-ea30-4936-a1f6-6fcd34b9502c/output.png",
"started_at": "2022-05-23T05:00:29.201315Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/phakdbkwp5cutp3iwpo7rntxyu",
"cancel": "https://api.replicate.com/v1/predictions/phakdbkwp5cutp3iwpo7rntxyu/cancel"
},
"version": "6461e9e71603c4720a4ea2e0d5fb6290276e08c01a3ce96cb9aa4e0b6ecf4ad4"
}
Object(s) to remove: cow
Loading EdgeModel generator...
Loading InpaintingModel generator...
1 tmp5j980blccowduck.jpeg
End test....
/tmp/tmp28908qfi/output.png