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 lucataco/gfpgan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/gfpgan:66a607f2c8ee93966fb2759b0bb93f48a707f46d2f75df5d66db73d3b5d8337d",
{
input: {
img: "https://replicate.delivery/pbxt/JHZ3EWjk4So7uLYChYiTWvmo9xm34aee6E5dg5ELXOgdo8Gq/AAA9hAAAPYQGoP6dpAAAKT2lD.png",
scale: 2,
version: "v1.3"
}
}
);
console.log(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 lucataco/gfpgan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/gfpgan:66a607f2c8ee93966fb2759b0bb93f48a707f46d2f75df5d66db73d3b5d8337d",
input={
"img": "https://replicate.delivery/pbxt/JHZ3EWjk4So7uLYChYiTWvmo9xm34aee6E5dg5ELXOgdo8Gq/AAA9hAAAPYQGoP6dpAAAKT2lD.png",
"scale": 2,
"version": "v1.3"
}
)
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 lucataco/gfpgan 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": "66a607f2c8ee93966fb2759b0bb93f48a707f46d2f75df5d66db73d3b5d8337d",
"input": {
"img": "https://replicate.delivery/pbxt/JHZ3EWjk4So7uLYChYiTWvmo9xm34aee6E5dg5ELXOgdo8Gq/AAA9hAAAPYQGoP6dpAAAKT2lD.png",
"scale": 2,
"version": "v1.3"
}
}' \
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-08-02T21:47:22.265846Z",
"created_at": "2023-08-02T21:47:18.911771Z",
"data_removed": false,
"error": null,
"id": "aigoy3lbzzppojegmd7kwfj644",
"input": {
"img": "https://replicate.delivery/pbxt/JHZ3EWjk4So7uLYChYiTWvmo9xm34aee6E5dg5ELXOgdo8Gq/AAA9hAAAPYQGoP6dpAAAKT2lD.png",
"scale": 2,
"version": "v1.3"
},
"logs": "/tmp/tmph8ko56viAAA9hAAAPYQGoP6dpAAAKT2lD.png v1.3 2.00.5",
"metrics": {
"predict_time": 3.339353,
"total_time": 3.354075
},
"output": "https://replicate.delivery/pbxt/hjzSzMlXpqKBIR3BPO89gRw0euU3uUhxwTQNlmgtAyv0BErIA/out..png",
"started_at": "2023-08-02T21:47:18.926493Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/aigoy3lbzzppojegmd7kwfj644",
"cancel": "https://api.replicate.com/v1/predictions/aigoy3lbzzppojegmd7kwfj644/cancel"
},
"version": "66a607f2c8ee93966fb2759b0bb93f48a707f46d2f75df5d66db73d3b5d8337d"
}
/tmp/tmph8ko56viAAA9hAAAPYQGoP6dpAAAKT2lD.png v1.3 2.00.5