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/MWruFtQDKdPw18FWrALpHmvoT1CJW6s7ziBC0H6YUEW1AuO4/upm36si3myg2fmyhwkxx6c8n986g.png"
}
}
);
// 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/MWruFtQDKdPw18FWrALpHmvoT1CJW6s7ziBC0H6YUEW1AuO4/upm36si3myg2fmyhwkxx6c8n986g.png"
}
)
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/MWruFtQDKdPw18FWrALpHmvoT1CJW6s7ziBC0H6YUEW1AuO4/upm36si3myg2fmyhwkxx6c8n986g.png"
}
}' \
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-20T00:45:21.442008Z",
"created_at": "2025-02-20T00:45:20.766000Z",
"data_removed": false,
"error": null,
"id": "azsj79qqzsrgc0cn438a1acfz8",
"input": {
"image": "https://replicate.delivery/pbxt/MWruFtQDKdPw18FWrALpHmvoT1CJW6s7ziBC0H6YUEW1AuO4/upm36si3myg2fmyhwkxx6c8n986g.png"
},
"logs": "Image reading time: 0.026s\nPreprocessing time: 0.007s\nOriginal image shape: (768, 768), Preprocessed shape: torch.Size([3, 1024, 1024])\nTensor conversion time: 0.004s\nTransform time: 0.002s\nTotal image loading pipeline time: 0.064s\nTransfer to device time: 0.003s\nModel inference time: 0.011s\nUpsampling time: 0.001s\nFinal processing and transfer back to CPU time: 0.122s\nTotal prediction time: 0.137s\nFinal image processing and saving time: 0.254s\nTotal processing time: 0.455s",
"metrics": {
"predict_time": 0.65870071,
"total_time": 0.676008
},
"output": "https://replicate.delivery/czjl/Bbz6unfdxP0IXa14KKifO2SHWU3ewSlSQ3HPldcNHKcDpFioA/output.png",
"started_at": "2025-02-20T00:45:20.783307Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/fddq-dft3y2l3dg6733np3epa32rdjjxbbxkyewr3jjnybebj3gs3d3qa",
"get": "https://api.replicate.com/v1/predictions/azsj79qqzsrgc0cn438a1acfz8",
"cancel": "https://api.replicate.com/v1/predictions/azsj79qqzsrgc0cn438a1acfz8/cancel"
},
"version": "9ef3e8df2d718749ca9cfd583cb501e108007d6eff2a2a5cd58abf5914a77e0f"
}
Image reading time: 0.026s
Preprocessing time: 0.007s
Original image shape: (768, 768), Preprocessed shape: torch.Size([3, 1024, 1024])
Tensor conversion time: 0.004s
Transform time: 0.002s
Total image loading pipeline time: 0.064s
Transfer to device time: 0.003s
Model inference time: 0.011s
Upsampling time: 0.001s
Final processing and transfer back to CPU time: 0.122s
Total prediction time: 0.137s
Final image processing and saving time: 0.254s
Total processing time: 0.455s