|
3 | 3 | The script also provides the ability to do face restoration and |
4 | 4 | upscaling with the help of GFPGAN and Real-ESRGAN respectively. |
5 | 5 |
|
6 | | -To use the ability, clone the **[GFPGAN |
7 | | -repository](https://github.com/TencentARC/GFPGAN)** and follow their |
8 | | -installation instructions. By default, we expect GFPGAN to be |
9 | | -installed in a 'GFPGAN' sibling directory. Be sure that the `"ldm"` |
10 | | -conda environment is active as you install GFPGAN. |
11 | | - |
12 | | -You can use the `--gfpgan_dir` argument with `dream.py` to set a |
| 6 | +As of version 1.14, environment.yaml will install the Real-ESRGAN package into the |
| 7 | +standard install location for python packages, and will put GFPGAN into a subdirectory of "src" |
| 8 | +in the stable-diffusion directory. |
| 9 | +(The reason for this is that the standard GFPGAN distribution has a minor bug that adversely affects image |
| 10 | +color.) Upscaling with Real-ESRGAN should "just work" without further intervention. Simply pass the --upscale (-U) |
| 11 | +option on the dream> command line, or indicate the desired scale on the popup in the Web GUI. |
| 12 | + |
| 13 | +For **GFPGAN** to work, there is one additional step needed. You will need to download and |
| 14 | +copy the GFPGAN [models file](https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth) |
| 15 | +into **src/gfpgan/experiments/pretrained_models**. On Mac and Linux systems, here's how you'd do it using |
| 16 | +**wget**: |
| 17 | +~~~~ |
| 18 | +> wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth src/gfpgan/experiments/pretrained_models/ |
| 19 | +~~~~ |
| 20 | + |
| 21 | +Make sure that you're in the stable-diffusion directory when you do this. |
| 22 | + |
| 23 | +Alternatively, if you have GFPGAN installed elsewhere, or if you are using |
| 24 | +an earlier version of this package which asked you to install GFPGAN in a |
| 25 | +sibling directory, you may use the `--gfpgan_dir` argument with `dream.py` to set a |
13 | 26 | custom path to your GFPGAN directory. _There are other GFPGAN related |
14 | 27 | boot arguments if you wish to customize further._ |
15 | 28 |
|
16 | | -You can install **Real-ESRGAN** by typing the following command. |
17 | | - |
18 | | -``` |
19 | | -pip install realesrgan |
20 | | -``` |
21 | | - |
22 | 29 | **Note: Internet connection needed:** |
23 | 30 | Users whose GPU machines are isolated from the Internet (e.g. on a |
24 | 31 | University cluster) should be aware that the first time you run |
|
0 commit comments