Skip to content

A set of Docker files for xinntao/Real-ESRGAN with CUDA support

License

Notifications You must be signed in to change notification settings

ralphv/Real-ESRGAN-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Real-ESRGAN-Docker

This uses the following repo: https://github.com/xinntao/Real-ESRGAN

GitHub Image references:

Images pushed to dockerhub as well as GitHub

docker pull ralphv/realesrgan
docker pull ralphv/realesrgan-with-models

OR

docker pull ghcr.io/ralphv/realesrgan
docker pull ghcr.io/ralphv/realesrgan-with-models

How to build

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:
    docker run --rm ralphv/realesrgan
  • Run on a sample input file test.jpg to produce the output as test_out.jpg in same folder
    docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models -o /data/ -i /data/test.jpg
  • Run on all files in current directory
    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

IMAGE_NAME: <custom>/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.

Useful aliases

alias enhance='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --fp32 -i /data/ -o /data/ -s 1'
alias enlarge='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --fp32 -i /data/ -o /data/ -s 2'
alias enhancef='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --face_enhance --fp32 -i /data/ -o /data/ -s 1'
alias enlargef='docker run --rm --gpus all -v .:/data ralphv/realesrgan-with-models --face_enhance --fp32 -i /data/ -o /data/ -s 2'

About

A set of Docker files for xinntao/Real-ESRGAN with CUDA support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages