# GFPGAN

GFPGAN is a practical face restoration algorithm for "old photos" or "AI-generated faces". You can learn more about the model [here](https://replicate.com/tencentarc/gfpgan/versions/9283608cc6b7be6b65a8e44983db012355fde4132009bf99d976b2f0896856a3).

&#x20;A full video tutorial on how to use this model can be found below:

{% embed url="<https://www.youtube.com/watch?v=-VlztwBGzns>" %}

You can generate restored images using GFPGAN by using the "Create Prediction - GFPGAN" workflow action.

<figure><img src="https://1187100604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3ueA3DZDjlYOZVlFZToc%2Fuploads%2F1ZboZWIypFNp57iBM1lO%2F2023-09-07%2009.53.37.gif?alt=media&#x26;token=2b19c4be-cbae-499e-853f-d0e000231e2b" alt=""><figcaption></figcaption></figure>

It requires the following inputs:

<table><thead><tr><th width="154">Input</th><th width="145.99999999999997">Type of Field</th><th>Description</th></tr></thead><tbody><tr><td>Image URL</td><td>Text</td><td>The URL of the image you're restoring*</td></tr><tr><td>Scale</td><td>Number (integer)</td><td>Rescaling factor. EG if you pick "2", the returned image will be 2x as large.</td></tr></tbody></table>

*\* If you are using an image uploaded via the picture uploader/file uploader element as the value, it's important to set this field to "FileUploader A's value's **URL**" - see below for an example:*

<div align="left"><figure><img src="https://1187100604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3ueA3DZDjlYOZVlFZToc%2Fuploads%2FGzvVIJLXmmqbjyzFFISK%2FScreenshot%202023-09-07%20at%2009.58.53.png?alt=media&#x26;token=b7ba12a9-4473-4cef-a6a3-8f9f6e841518" alt="" width="266"><figcaption></figcaption></figure></div>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cranford-tech.gitbook.io/replicate-ai-and-ml-models-plugin/creating-predictions/gfpgan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
