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 image
Factor to scale image by
Default: 4
Run GFPGAN face enhancement along with upscaling
Default: false
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
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 daanelson/real-esrgan-a100 using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "daanelson/real-esrgan-a100:f94d7ed4a1f7e1ffed0d51e4089e4911609d5eeee5e874ef323d2c7562624bed", { input: { image: "https://replicate.delivery/pbxt/IS6z50uYJFdFeh1vCmXe9zasYbG16HqOOMETljyUJ1hmlUXU/keanu.jpeg", scale: 4, face_enhance: true } } ); console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
import replicate
output = replicate.run( "daanelson/real-esrgan-a100:f94d7ed4a1f7e1ffed0d51e4089e4911609d5eeee5e874ef323d2c7562624bed", input={ "image": "https://replicate.delivery/pbxt/IS6z50uYJFdFeh1vCmXe9zasYbG16HqOOMETljyUJ1hmlUXU/keanu.jpeg", "scale": 4, "face_enhance": True } ) print(output)
To learn more, take a look at the guide on getting started with Python.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "f94d7ed4a1f7e1ffed0d51e4089e4911609d5eeee5e874ef323d2c7562624bed", "input": { "image": "https://replicate.delivery/pbxt/IS6z50uYJFdFeh1vCmXe9zasYbG16HqOOMETljyUJ1hmlUXU/keanu.jpeg", "scale": 4, "face_enhance": true } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{ "completed_at": "2023-03-10T22:52:08.998022Z", "created_at": "2023-03-10T22:52:07.049866Z", "data_removed": false, "error": null, "id": "s54erdu6azdexpz2kh2fsopbn4", "input": { "image": "https://replicate.delivery/pbxt/IS6z50uYJFdFeh1vCmXe9zasYbG16HqOOMETljyUJ1hmlUXU/keanu.jpeg", "scale": 4, "face_enhance": true }, "logs": "running with face enhancement", "metrics": { "predict_time": 1.875832, "total_time": 1.948156 }, "output": "https://replicate.delivery/pbxt/lv0iOW3u6DrNOd30ybfmufqWebiuW10YjILw05YZGbeipZZCB/output.png", "started_at": "2023-03-10T22:52:07.122190Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/s54erdu6azdexpz2kh2fsopbn4", "cancel": "https://api.replicate.com/v1/predictions/s54erdu6azdexpz2kh2fsopbn4/cancel" }, "version": "499940604f95b416c3939423df5c64a5c95cfd32b464d755dacfe2192a2de7ef" }
running with face enhancement
This example was created by a different version, daanelson/real-esrgan-a100:49994060.
Choose a file from your machine
Hint: you can also drag files onto the input