Original Upscaled
Expose Real-ESRGAN with local_comm.
This allows Real-ESRGAN to be isolated into a conda environment and called from another with minimal dependancies.
- Clone the repo (remember to include the
--recursiveflag) - Create conda environment and activate:
conda create -n lc_realesrgan python=3.10(only tested for Python 3.10) - Change directory
cd lc_Real-ESRGAN - Install dependencies
- Install Real-ESRGAN
- Change directory:
cd extern/Real-ESRGAN - See instructions, here.
- Change directory:
- Install
local_comm:- Change directory:
cd ../.. - Install:
pip install extern/local_comm
- Change directory:
- Install:
pip install .
You can start the server using
conda activate lc_realesrgan
python -m lc_realesrgan.image_upscale_server
A client needs to send and receive an image as bytes.
It is recommended that you use pillow.
See the scripts/test_client.py example to see how to interface with the server.
The Real-ESRGAN has several inference scripts you can run. For example, the following
cd /path/to/lc_Real-ESRGAN/extern/Real-ESRGAN
conda activate lc_realesrgan
python inference_realesrgan.py -n RealESRGAN_x4plus -i inputs
In one terminal
conda activate lc_realesrgan
python -m lc_realesrgan.image_upscale_server
In a second terminal
# conda activate ...
pip install pillow
python scripts/test_client.py scripts/old.jpg
ModuleNotFoundError: No module named 'torchvision.transforms.functional_tensor': see here

