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.
lhoyer /hrda:5a260c83
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 lhoyer/hrda using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lhoyer/hrda:5a260c83723c8e79a87a9cba90f5c00e84193bb1c251e327f9beb467e4fa5b64",
{
input: {
opacity: 0.75,
input_image: "https://replicate.delivery/mgxm/29eefb43-84e0-4f82-b75d-9f07cf90ba8b/16th-Street-Mall-CO-1.jpg"
}
}
);
// 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 lhoyer/hrda using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lhoyer/hrda:5a260c83723c8e79a87a9cba90f5c00e84193bb1c251e327f9beb467e4fa5b64",
input={
"opacity": 0.75,
"input_image": "https://replicate.delivery/mgxm/29eefb43-84e0-4f82-b75d-9f07cf90ba8b/16th-Street-Mall-CO-1.jpg"
}
)
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 lhoyer/hrda 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": "5a260c83723c8e79a87a9cba90f5c00e84193bb1c251e327f9beb467e4fa5b64",
"input": {
"opacity": 0.75,
"input_image": "https://replicate.delivery/mgxm/29eefb43-84e0-4f82-b75d-9f07cf90ba8b/16th-Street-Mall-CO-1.jpg"
}
}' \
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-06-03T06:36:12.516642Z",
"created_at": "2022-06-03T06:33:53.884113Z",
"data_removed": false,
"error": null,
"id": "ona3uh7fivej7f5ojgbmfdzdyi",
"input": {
"opacity": 0.75,
"input_image": "https://replicate.delivery/mgxm/29eefb43-84e0-4f82-b75d-9f07cf90ba8b/16th-Street-Mall-CO-1.jpg"
},
"logs": "2022-06-03 06:36:07,376 - mmseg - INFO - Loaded 1 images from data/dummy_cityscapes/leftImg8bit/val\n/root/.pyenv/versions/3.8.13/lib/python3.8/site-packages/torch/nn/functional.py:3103: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.\n warnings.warn(\"The default behavior for interpolate/upsample with float scale_factor changed \"",
"metrics": {
"predict_time": 14.364986,
"total_time": 138.632529
},
"output": "https://replicate.delivery/mgxm/8dd7b5a9-187a-4191-b723-5dd49540fc76/output.png",
"started_at": "2022-06-03T06:35:58.151656Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/ona3uh7fivej7f5ojgbmfdzdyi",
"cancel": "https://api.replicate.com/v1/predictions/ona3uh7fivej7f5ojgbmfdzdyi/cancel"
},
"version": "5a260c83723c8e79a87a9cba90f5c00e84193bb1c251e327f9beb467e4fa5b64"
}
2022-06-03 06:36:07,376 - mmseg - INFO - Loaded 1 images from data/dummy_cityscapes/leftImg8bit/val
/root/.pyenv/versions/3.8.13/lib/python3.8/site-packages/torch/nn/functional.py:3103: UserWarning: The default behavior for interpolate/upsample with float scale_factor changed in 1.6.0 to align with other frameworks/libraries, and now uses scale_factor directly, instead of relying on the computed output size. If you wish to restore the old behavior, please set recompute_scale_factor=True. See the documentation of nn.Upsample for details.
warnings.warn("The default behavior for interpolate/upsample with float scale_factor changed "