Skip to content

Commit c7c6cd7

Browse files
authored
Update UPSCALE.md
New instructions needed to accommodate fact that the ESRGAN and GFPGAN packages are now installed by environment.yaml.
1 parent 77ca83e commit c7c6cd7

File tree

1 file changed

+20
-13
lines changed

1 file changed

+20
-13
lines changed

docs/features/UPSCALE.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@
33
The script also provides the ability to do face restoration and
44
upscaling with the help of GFPGAN and Real-ESRGAN respectively.
55

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
1326
custom path to your GFPGAN directory. _There are other GFPGAN related
1427
boot arguments if you wish to customize further._
1528

16-
You can install **Real-ESRGAN** by typing the following command.
17-
18-
```
19-
pip install realesrgan
20-
```
21-
2229
**Note: Internet connection needed:**
2330
Users whose GPU machines are isolated from the Internet (e.g. on a
2431
University cluster) should be aware that the first time you run

0 commit comments

Comments
 (0)