ai_gfpgan
An authenticated client can post a request to this AI to improve the quality of an image, mostly used for face restoration and enlarging images of faces.
This AI can run AI alongside a Daemon on GPU only
Get the JSON config file for this AI
GET
https://opensourceais.com/api/v1/public/config/gfpgan
You should not need to call this endpoint. This is just a FYI to understand all input parameters sent to the AI.
{
"data": {
"engine": "gfpgan",
"version": "1.0.3",
"name": "Face Restauration & Hi-Res",
"description": "Image Utility",
"isFree": false,
"requiresGPU": true,
"aParam": [
{
"in": "url_upload",
"out": "-filename",
"isMandatory": true,
"type": "string",
"default": null,
"accept": {
"$max": 2048
},
"ui": {
"title": "Image input",
"widget": "uiSelectPicture",
"column": 1
}
},
{
"in": "res",
"out": "-s",
"isMandatory": true,
"type": "int",
"default": 1,
"accept": {
"$in": [
1,
2,
4
],
"display": [
"x1",
"x2",
"x4"
]
},
"freeAccess": {
"$max": 1
},
"ui": {
"title": "Output resolution",
"widget": "uiMultiToggle",
"unit": "px",
"column": 2
}
},
{
"in": "weight",
"out": "-w",
"isMandatory": false,
"type": "float",
"default": 0.5
},
{
"in": "ver",
"out": "-v",
"isMandatory": false,
"type": "string",
"default": "1.3"
},
{
"in": "output",
"out": "-o",
"isMandatory": true,
"type": "function",
"default": "$output_uid.ext"
},
{
"in": "idir",
"out": "-idir",
"isMandatory": false,
"type": "string",
"default": "./_input/"
},
{
"in": "odir",
"out": "-odir",
"isMandatory": false,
"type": "string",
"default": "./_output/"
}
]
}
}
Post a request to restore an image via OpenSourceAIs
POST
https://opensourceais.com/api/v1/private/client/ai/gfpgan
Request Body
Name
Type
Description
url_upload*
String
A well formed URI starting with https://... and accessing a PNG or JPG image.
res
int
the output resolution, either 1, 2, or 4. A value of 1 keeps the same resolution, a value of 2 doubles the size of the image. Default is 1.
{
"data": {
"uid": 1678361974000,
"created_at": "2023-03-09T11:39:44.000Z"
}
}
Last updated