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/K3HorhanHXhZ8WeWpH1udCnnXe3UX1Olmp619RN3nHxNBBmU/WechatIMG17527_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/K3HorhanHXhZ8WeWpH1udCnnXe3UX1Olmp619RN3nHxNBBmU/WechatIMG17527_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/K3HorhanHXhZ8WeWpH1udCnnXe3UX1Olmp619RN3nHxNBBmU/WechatIMG17527_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:28:13.995762Z",
"created_at": "2023-12-15T08:27:59.350010Z",
"data_removed": false,
"error": null,
"id": "zxctnwtbp2ke2qy53cxkl2ekv4",
"input": {
"image": "https://replicate.delivery/pbxt/K3HorhanHXhZ8WeWpH1udCnnXe3UX1Olmp619RN3nHxNBBmU/WechatIMG17527_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.57s/it]\u001b[A\ndenoising: 20%|██ | 2/10 [00:02<00:09, 1.16s/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.04it/s]\u001b[A\ndenoising: 50%|█████ | 5/10 [00:05<00:04, 1.08it/s]\u001b[A\ndenoising: 60%|██████ | 6/10 [00:05<00:03, 1.10it/s]\u001b[A\ndenoising: 70%|███████ | 7/10 [00:06<00:02, 1.12it/s]\u001b[A\ndenoising: 80%|████████ | 8/10 [00:07<00:01, 1.13it/s]\u001b[A\ndenoising: 90%|█████████ | 9/10 [00:08<00:00, 1.13it/s]\u001b[A\ndenoising: 100%|██████████| 10/10 [00:09<00:00, 1.14it/s]\u001b[A\n \u001b[A\nmultiple inference: 100%|██████████| 1/1 [00:09<00:00, 9.45s/it]",
"metrics": {
"predict_time": 14.571437,
"total_time": 14.645752
},
"output": [
"https://replicate.delivery/pbxt/fS7CT14IFJXyHiAIfcKospCWztxuheAEyR8zffRKhR1lDgTQC/depth_bw.png",
"https://replicate.delivery/pbxt/TadKPFoM0Nr3Ktl6gyAcdEUp5mUTWN8rOokJlNJD0zTHAngE/depth_colored.png"
],
"started_at": "2023-12-15T08:27:59.424325Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/zxctnwtbp2ke2qy53cxkl2ekv4",
"cancel": "https://api.replicate.com/v1/predictions/zxctnwtbp2ke2qy53cxkl2ekv4/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.57s/it]
denoising: 20%|██ | 2/10 [00:02<00:09, 1.16s/it]
denoising: 30%|███ | 3/10 [00:03<00:07, 1.02s/it]
denoising: 40%|████ | 4/10 [00:04<00:05, 1.04it/s]
denoising: 50%|█████ | 5/10 [00:05<00:04, 1.08it/s]
denoising: 60%|██████ | 6/10 [00:05<00:03, 1.10it/s]
denoising: 70%|███████ | 7/10 [00:06<00:02, 1.12it/s]
denoising: 80%|████████ | 8/10 [00:07<00:01, 1.13it/s]
denoising: 90%|█████████ | 9/10 [00:08<00:00, 1.13it/s]
denoising: 100%|██████████| 10/10 [00:09<00:00, 1.14it/s]
multiple inference: 100%|██████████| 1/1 [00:09<00:00, 9.45s/it]