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.
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 adirik/marigold using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"adirik/marigold:1a363593bc4882684fc58042d19db5e13a810e44e02f8d4c32afd1eb30464818",
{
input: {
image: "https://replicate.delivery/pbxt/K3Hn7u1rSVlRRjCXxGVjXU6zfIX09DW30uYjRtYapxR5YDiX/S-IC_engines_and_Von_Braun_crop43.jpg",
max_iter: 5,
num_infer: 10,
resize_input: true,
denoise_steps: 10,
reduction_method: "median",
regularizer_strength: 0.02
}
}
);
// 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 adirik/marigold using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"adirik/marigold:1a363593bc4882684fc58042d19db5e13a810e44e02f8d4c32afd1eb30464818",
input={
"image": "https://replicate.delivery/pbxt/K3Hn7u1rSVlRRjCXxGVjXU6zfIX09DW30uYjRtYapxR5YDiX/S-IC_engines_and_Von_Braun_crop43.jpg",
"max_iter": 5,
"num_infer": 10,
"resize_input": True,
"denoise_steps": 10,
"reduction_method": "median",
"regularizer_strength": 0.02
}
)
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 adirik/marigold 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": "adirik/marigold:1a363593bc4882684fc58042d19db5e13a810e44e02f8d4c32afd1eb30464818",
"input": {
"image": "https://replicate.delivery/pbxt/K3Hn7u1rSVlRRjCXxGVjXU6zfIX09DW30uYjRtYapxR5YDiX/S-IC_engines_and_Von_Braun_crop43.jpg",
"max_iter": 5,
"num_infer": 10,
"resize_input": true,
"denoise_steps": 10,
"reduction_method": "median",
"regularizer_strength": 0.02
}
}' \
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-12-15T08:26:24.116757Z",
"created_at": "2023-12-15T08:26:09.583150Z",
"data_removed": false,
"error": null,
"id": "cillxw3bb6x3zngakajlnusgre",
"input": {
"image": "https://replicate.delivery/pbxt/K3Hn7u1rSVlRRjCXxGVjXU6zfIX09DW30uYjRtYapxR5YDiX/S-IC_engines_and_Von_Braun_crop43.jpg",
"max_iter": 5,
"num_infer": 10,
"resize_input": true,
"denoise_steps": 10,
"reduction_method": "median",
"regularizer_strength": 0.02
},
"logs": "multiple inference: 0%| | 0/1 [00:00<?, ?it/s]\ndenoising: 0%| | 0/10 [00:00<?, ?it/s]\u001b[A\ndenoising: 10%|█ | 1/10 [00:01<00:14, 1.56s/it]\u001b[A\ndenoising: 20%|██ | 2/10 [00:02<00:09, 1.14s/it]\u001b[A\ndenoising: 30%|███ | 3/10 [00:03<00:07, 1.02s/it]\u001b[A\ndenoising: 40%|████ | 4/10 [00:04<00:05, 1.05it/s]\u001b[A\ndenoising: 50%|█████ | 5/10 [00:04<00:04, 1.09it/s]\u001b[A\ndenoising: 60%|██████ | 6/10 [00:05<00:03, 1.11it/s]\u001b[A\ndenoising: 70%|███████ | 7/10 [00:06<00:02, 1.13it/s]\u001b[A\ndenoising: 80%|████████ | 8/10 [00:07<00:01, 1.14it/s]\u001b[A\ndenoising: 90%|█████████ | 9/10 [00:08<00:00, 1.14it/s]\u001b[A\ndenoising: 100%|██████████| 10/10 [00:09<00:00, 1.15it/s]\u001b[A\n \u001b[A\nmultiple inference: 100%|██████████| 1/1 [00:09<00:00, 9.34s/it]",
"metrics": {
"predict_time": 14.471544,
"total_time": 14.533607
},
"output": [
"https://replicate.delivery/pbxt/rjEj4iCyigrPMh5yl1nQi3K7POuWJ8ez1QDe2ZofyXRd93EkA/depth_bw.png",
"https://replicate.delivery/pbxt/WHkMnfiVHtW1DSflrBJBB1LtCT0q7hHMUNTaw22vBivve3EkA/depth_colored.png"
],
"started_at": "2023-12-15T08:26:09.645213Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/cillxw3bb6x3zngakajlnusgre",
"cancel": "https://api.replicate.com/v1/predictions/cillxw3bb6x3zngakajlnusgre/cancel"
},
"version": "1a363593bc4882684fc58042d19db5e13a810e44e02f8d4c32afd1eb30464818"
}
multiple inference: 0%| | 0/1 [00:00<?, ?it/s]
denoising: 0%| | 0/10 [00:00<?, ?it/s]
denoising: 10%|█ | 1/10 [00:01<00:14, 1.56s/it]
denoising: 20%|██ | 2/10 [00:02<00:09, 1.14s/it]
denoising: 30%|███ | 3/10 [00:03<00:07, 1.02s/it]
denoising: 40%|████ | 4/10 [00:04<00:05, 1.05it/s]
denoising: 50%|█████ | 5/10 [00:04<00:04, 1.09it/s]
denoising: 60%|██████ | 6/10 [00:05<00:03, 1.11it/s]
denoising: 70%|███████ | 7/10 [00:06<00:02, 1.13it/s]
denoising: 80%|████████ | 8/10 [00:07<00:01, 1.14it/s]
denoising: 90%|█████████ | 9/10 [00:08<00:00, 1.14it/s]
denoising: 100%|██████████| 10/10 [00:09<00:00, 1.15it/s]
multiple inference: 100%|██████████| 1/1 [00:09<00:00, 9.34s/it]