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.
lqhl /realesrgan:56f2be05
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 lqhl/realesrgan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lqhl/realesrgan:56f2be05920413e1189c32a5fb2f767b357187c887d67114cace11c18d86ab49",
{
input: {
img: "https://replicate.delivery/pbxt/JeM4zZQu0BGlvPiOqu6BclFQLcr4uCsRBulTS5mMVDqZiAdC/e512564400014599b143497df8fca4aa.jpeg",
tile: 0,
scale: 2,
version: "General - RealESRGANplus",
face_enhance: true
}
}
);
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 lqhl/realesrgan using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lqhl/realesrgan:56f2be05920413e1189c32a5fb2f767b357187c887d67114cace11c18d86ab49",
input={
"img": "https://replicate.delivery/pbxt/JeM4zZQu0BGlvPiOqu6BclFQLcr4uCsRBulTS5mMVDqZiAdC/e512564400014599b143497df8fca4aa.jpeg",
"tile": 0,
"scale": 2,
"version": "General - RealESRGANplus",
"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 lqhl/realesrgan 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": "56f2be05920413e1189c32a5fb2f767b357187c887d67114cace11c18d86ab49",
"input": {
"img": "https://replicate.delivery/pbxt/JeM4zZQu0BGlvPiOqu6BclFQLcr4uCsRBulTS5mMVDqZiAdC/e512564400014599b143497df8fca4aa.jpeg",
"tile": 0,
"scale": 2,
"version": "General - RealESRGANplus",
"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": "2023-10-06T02:47:00.650586Z",
"created_at": "2023-10-06T02:45:50.218582Z",
"data_removed": false,
"error": null,
"id": "qa2c5kdbcucyt7dbtw22clyhxq",
"input": {
"img": "https://replicate.delivery/pbxt/JeM4zZQu0BGlvPiOqu6BclFQLcr4uCsRBulTS5mMVDqZiAdC/e512564400014599b143497df8fca4aa.jpeg",
"tile": 0,
"scale": 2,
"version": "General - RealESRGANplus",
"face_enhance": true
},
"logs": "img: /tmp/tmpvb852ci6e512564400014599b143497df8fca4aa.jpeg. version: General - RealESRGANplus. scale: 2.0. face_enhance: True. tile: 0.\nDownloading: \"https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth\" to /src/gfpgan/weights/detection_Resnet50_Final.pth\n 0%| | 0.00/104M [00:00<?, ?B/s]\n 26%|██▋ | 27.5M/104M [00:00<00:00, 288MB/s]\n 53%|█████▎ | 55.0M/104M [00:00<00:00, 228MB/s]\n 74%|███████▍ | 77.5M/104M [00:00<00:00, 221MB/s]\n 95%|█████████▍| 98.9M/104M [00:00<00:00, 215MB/s]\n100%|██████████| 104M/104M [00:00<00:00, 225MB/s]\nDownloading: \"https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth\" to /src/gfpgan/weights/parsing_parsenet.pth\n 0%| | 0.00/81.4M [00:00<?, ?B/s]\n 16%|█▌ | 12.6M/81.4M [00:00<00:00, 132MB/s]\n 49%|████▉ | 39.7M/81.4M [00:00<00:00, 221MB/s]\n 80%|███████▉ | 64.8M/81.4M [00:00<00:00, 241MB/s]\n100%|██████████| 81.4M/81.4M [00:00<00:00, 249MB/s]\n/root/.pyenv/versions/3.8.18/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.\nwarnings.warn(\"The default behavior for interpolate/upsample with float scale_factor changed \"",
"metrics": {
"predict_time": 12.467587,
"total_time": 70.432004
},
"output": "https://pbxt.replicate.delivery/PIllGCXv2YKuHlshQfziTe1njFfxUk6cUkJOwTTKKf3MyJtGB/out.png",
"started_at": "2023-10-06T02:46:48.182999Z",
"status": "succeeded",
"urls": {
"get": "https://api.replicate.com/v1/predictions/qa2c5kdbcucyt7dbtw22clyhxq",
"cancel": "https://api.replicate.com/v1/predictions/qa2c5kdbcucyt7dbtw22clyhxq/cancel"
},
"version": "56f2be05920413e1189c32a5fb2f767b357187c887d67114cace11c18d86ab49"
}
img: /tmp/tmpvb852ci6e512564400014599b143497df8fca4aa.jpeg. version: General - RealESRGANplus. scale: 2.0. face_enhance: True. tile: 0.
Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.1.0/detection_Resnet50_Final.pth" to /src/gfpgan/weights/detection_Resnet50_Final.pth
0%| | 0.00/104M [00:00<?, ?B/s]
26%|██▋ | 27.5M/104M [00:00<00:00, 288MB/s]
53%|█████▎ | 55.0M/104M [00:00<00:00, 228MB/s]
74%|███████▍ | 77.5M/104M [00:00<00:00, 221MB/s]
95%|█████████▍| 98.9M/104M [00:00<00:00, 215MB/s]
100%|██████████| 104M/104M [00:00<00:00, 225MB/s]
Downloading: "https://github.com/xinntao/facexlib/releases/download/v0.2.2/parsing_parsenet.pth" to /src/gfpgan/weights/parsing_parsenet.pth
0%| | 0.00/81.4M [00:00<?, ?B/s]
16%|█▌ | 12.6M/81.4M [00:00<00:00, 132MB/s]
49%|████▉ | 39.7M/81.4M [00:00<00:00, 221MB/s]
80%|███████▉ | 64.8M/81.4M [00:00<00:00, 241MB/s]
100%|██████████| 81.4M/81.4M [00:00<00:00, 249MB/s]
/root/.pyenv/versions/3.8.18/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 "