https://github.com/ralphv/real-esrgan-docker
A set of Docker files for xinntao/Real-ESRGAN with CUDA support
https://github.com/ralphv/real-esrgan-docker
Last synced: 6 months ago
JSON representation
A set of Docker files for xinntao/Real-ESRGAN with CUDA support
- Host: GitHub
- URL: https://github.com/ralphv/real-esrgan-docker
- Owner: ralphv
- License: mit
- Created: 2025-02-17T14:57:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-19T16:09:45.000Z (over 1 year ago)
- Last Synced: 2025-10-10T17:08:13.709Z (10 months ago)
- Language: Dockerfile
- Size: 31.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Real-ESRGAN-Docker
This uses the following repo: [https://github.com/xinntao/Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN)
## GitHub Image references:
Images pushed to dockerhub as well as GitHub
```docker
docker pull ralphv/realesrgan
```
```docker
docker pull ralphv/realesrgan-with-models
```
OR
```docker
docker pull ghcr.io/ralphv/realesrgan
```
```docker
docker pull ghcr.io/ralphv/realesrgan-with-models
```
## How to build
```shell
make build
```
By default, this will create three images:
* `ralphv/realesrgan-base`: Base image functional without volumes
* `ralphv/realesrgan`: The main image to use that creates some volumes to retain downloads
* `ralphv/realesrgan-with-models`: Image with pre-downloaded models (recommended)
__WARNING__: The produced images are very large, close to `10 GB`
## Example runs:
* Run to get the help information:
```shell
docker run --rm ralphv/realesrgan
```
* Run on a sample input file `test.jpg` to produce the output as `test_out.jpg` in same folder
```shell
docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models -o /data/ -i /data/test.jpg
```
* Run on all files in current directory
```shell
docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models -o /data/ -i /data/
```
### Modify image names:
You can create `.env` file and define a custom image name using the variable `IMAGE_NAME`
```dotenv
IMAGE_NAME: /realesrgan
```
### Useful command line arguments
* `--face_enhance`: Enhances faces but sometimes can create weird faces.
* `--fp32`: Use fp32 precision during inference. Default: fp16 (half precision).
* `-s 2`: The scaling factor, can be put to 1 to just enhance images.
You can find more info at the [main repo of the library here.](https://github.com/xinntao/Real-ESRGAN)
### Useful aliases
```shell
alias enhance='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --fp32 -i /data/ -o /data/ -s 1'
```
```shell
alias enlarge='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --fp32 -i /data/ -o /data/ -s 2'
```
```shell
alias enhancef='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --face_enhance --fp32 -i /data/ -o /data/ -s 1'
```
```shell
alias enlargef='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --face_enhance --fp32 -i /data/ -o /data/ -s 2'
```