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.
catacolabs /dis-background-removal:9ef3e8df
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 catacolabs/dis-background-removal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"catacolabs/dis-background-removal:9ef3e8df2d718749ca9cfd583cb501e108007d6eff2a2a5cd58abf5914a77e0f",
{
input: {
image: "https://replicate.delivery/pbxt/MWs8QifbDVCi7Mz7oDfrnElCo2Pd7I1ihAnxEtLE7uKseQ1v/replicate-prediction-jyy8z6vze9rm60ch23ttqk6rpc.webp"
}
}
);
// 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 catacolabs/dis-background-removal using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"catacolabs/dis-background-removal:9ef3e8df2d718749ca9cfd583cb501e108007d6eff2a2a5cd58abf5914a77e0f",
input={
"image": "https://replicate.delivery/pbxt/MWs8QifbDVCi7Mz7oDfrnElCo2Pd7I1ihAnxEtLE7uKseQ1v/replicate-prediction-jyy8z6vze9rm60ch23ttqk6rpc.webp"
}
)
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 catacolabs/dis-background-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": "catacolabs/dis-background-removal:9ef3e8df2d718749ca9cfd583cb501e108007d6eff2a2a5cd58abf5914a77e0f",
"input": {
"image": "https://replicate.delivery/pbxt/MWs8QifbDVCi7Mz7oDfrnElCo2Pd7I1ihAnxEtLE7uKseQ1v/replicate-prediction-jyy8z6vze9rm60ch23ttqk6rpc.webp"
}
}' \
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": "2025-02-20T01:00:17.982902Z",
"created_at": "2025-02-20T01:00:17.319000Z",
"data_removed": false,
"error": null,
"id": "6v6r7sn64xrgc0cn43fa2c2h5c",
"input": {
"image": "https://replicate.delivery/pbxt/MWs8QifbDVCi7Mz7oDfrnElCo2Pd7I1ihAnxEtLE7uKseQ1v/replicate-prediction-jyy8z6vze9rm60ch23ttqk6rpc.webp"
},
"logs": "Image reading time: 0.021s\nPreprocessing time: 0.006s\nOriginal image shape: (1024, 1024), Preprocessed shape: torch.Size([3, 1024, 1024])\nTensor conversion time: 0.001s\nTransform time: 0.002s\nTotal image loading pipeline time: 0.048s\nTransfer to device time: 0.003s\nModel inference time: 0.008s\nUpsampling time: 0.000s\nFinal processing and transfer back to CPU time: 0.129s\nTotal prediction time: 0.140s\nFinal image processing and saving time: 0.272s\nTotal processing time: 0.461s",
"metrics": {
"predict_time": 0.639663481,
"total_time": 0.663902
},
"output": "https://replicate.delivery/czjl/RADQe1UNELxnRqzXXbnYwAp8O9XFDdfMe2xeeMkd8RYOUYIiC/output.png",
"started_at": "2025-02-20T01:00:17.343238Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/fddq-5xp2aybfeghbfwjptagwdf35gxzrutak4ubdbtjigy4cqnvbttfa",
"get": "https://api.replicate.com/v1/predictions/6v6r7sn64xrgc0cn43fa2c2h5c",
"cancel": "https://api.replicate.com/v1/predictions/6v6r7sn64xrgc0cn43fa2c2h5c/cancel"
},
"version": "9ef3e8df2d718749ca9cfd583cb501e108007d6eff2a2a5cd58abf5914a77e0f"
}
Image reading time: 0.021s
Preprocessing time: 0.006s
Original image shape: (1024, 1024), Preprocessed shape: torch.Size([3, 1024, 1024])
Tensor conversion time: 0.001s
Transform time: 0.002s
Total image loading pipeline time: 0.048s
Transfer to device time: 0.003s
Model inference time: 0.008s
Upsampling time: 0.000s
Final processing and transfer back to CPU time: 0.129s
Total prediction time: 0.140s
Final image processing and saving time: 0.272s
Total processing time: 0.461s