Difference between revisions of "ESRGAN Installation Guide for Windows"
m (Protected "ESRGAN Installation Guide for Windows" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
Revision as of 08:45, 12 August 2019
This guide will help you to install ESRGAN on Windows, by showing you step by step with images how to do it.
No knowledge of Python or coding is necessary to follow this guide.
If you have any problems during or after the installation, feel free to ask any questions on our Discord server and we will try to help you out.
Our goal is to open up A.I. upscaling to everyone, not just to those who can pay lots of money or are good at coding.
Before you start, make sure that your driver is up-to-date if you have an Nvidia GPU, to make sure it supports the newest cuda version. If you want to be on the save site, use the cuda driver.
- Get the latest stable 64-bit Python 3 release here: Python Download
- Run the installer and make sure that
Add Python 3.*x* to Pathand
Install launcher for all users (recommended)is selected, then click on Customize installation.
- Make sure that every Option is selected and click on next.
- Mirror my selections and click on install (Make sure that the install location contains no spaces).
- You have now successfully installed Python 3. Click on Close now.
- Press <Windows/Super key> + R. Enter
cmdand click on
- We will now install Pytorch:
- If you have a Nvidia graphic card enter the following command in the cmd:
<source lang="bash">pip install https://download.pytorch.org/whl/cu100/torch-1.1.0-cp37-cp37m-win_amd64.whl</source>then:
bash pip install https://download.pytorch.org/whl/cu100/torchvision-0.3.0-cp37-cp37m-win_amd64.whl
- If you have an AMD / Intel graphic card enter the following command in the cmd:
<source lang="bash">pip install https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-win_amd64.whl</source>then:
bash pip install https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-win_amd64.whl
- If the command won’t work for you, please report it and get a new one in the meantime here Pytorch Website. Select Stable, Windows, Pip, your Python version and your cuda version (should be the newest) or None for AMD / Intel users.
- Press Enter.
- Now we install the other requirements for running and training ESRGAN and SFTGAN. Enter:
<source lang="bash">pip install opencv-python</source>
Choose a folder where you want to install ESRGAN. Because of the maximum path length limitation in windows, I recommend something as short as possible like:
- Create a folder called
ctp(That will come in handy if you want to install Deorders scripts later)
- In the
ctpfolder create a folder called
- Open the
- Create a folder called
Now it is time to download ESRGAN:
- Go to the ESRGAN GitHub Repo (old model structure)
- Click on
Clone or Download
- Click on
Extract the contents of the folder into your
C:\ctp\esrganfolder you created in step 10. It should already be open and look like this:
Now it is time to download and install the default ESRGAN models:
- Go to the ESRGAN Pretrained Models Google Drive
- Download the two
- Put the two
.pthfiles that you have just downloaded into your
modelsfolder in your
- For example in:
If you have a Nvidia Graphic Card, then you have successfully installed ESRGAN, congratulations!
But If you have an AMD / Intel Graphic Card then open
test.pyin your ESRGAN folder with a text editor.
<source lang="python">device = torch.device('cuda') # if you want to run on CPU, change 'cuda' -> cpu</source>
into<source lang="python">device = torch.device('cpu') # if you want to run on CPU, change 'cuda' -> cpu</source>