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.
alexgenovese /upscaler:4f7eb3da
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";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run alexgenovese/upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"alexgenovese/upscaler:4f7eb3da655b5182e559d50a0437440f242992d47e5e20bd82829a79dee61ff3",
{
input: {
image: "https://replicate.delivery/pbxt/KDG7Jt1oR2ZjG73x31HaauNgo48BAUdooNX1Zti0l4H2CxJY/image-2.png",
scale: 2,
face_enhance: true
}
}
);
// 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 alexgenovese/upscaler using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"alexgenovese/upscaler:4f7eb3da655b5182e559d50a0437440f242992d47e5e20bd82829a79dee61ff3",
input={
"image": "https://replicate.delivery/pbxt/KDG7Jt1oR2ZjG73x31HaauNgo48BAUdooNX1Zti0l4H2CxJY/image-2.png",
"scale": 2,
"face_enhance": True
}
)
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 alexgenovese/upscaler 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": "alexgenovese/upscaler:4f7eb3da655b5182e559d50a0437440f242992d47e5e20bd82829a79dee61ff3",
"input": {
"image": "https://replicate.delivery/pbxt/KDG7Jt1oR2ZjG73x31HaauNgo48BAUdooNX1Zti0l4H2CxJY/image-2.png",
"scale": 2,
"face_enhance": true
}
}' \
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": "2024-01-12T10:45:04.196826Z",
"created_at": "2024-01-12T10:44:58.764725Z",
"data_removed": false,
"error": null,
"id": "52wqqjdb34zguzll4gomryqxzq",
"input": {
"image": "https://replicate.delivery/pbxt/KDG7Jt1oR2ZjG73x31HaauNgo48BAUdooNX1Zti0l4H2CxJY/image-2.png",
"scale": 2,
"face_enhance": true
},
"logs": null,
"metrics": {
"predict_time": 5.382292,
"total_time": 5.432101
},
"output": "https://replicate.delivery/pbxt/XcL62Gwya1IcO1xesIpoQFv0aYafdPkiYeMD93lZtgxeiyuIB/output.png",
"started_at": "2024-01-12T10:44:58.814534Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/52wqqjdb34zguzll4gomryqxzq",
"cancel": "https://api.replicate.com/v1/predictions/52wqqjdb34zguzll4gomryqxzq/cancel"
},
"version": "4f7eb3da655b5182e559d50a0437440f242992d47e5e20bd82829a79dee61ff3"
}