CodeFormer
CodeFormer copied to clipboard
Is it possible to predownload RealESRGAN?
trafficstars
jack@jack-Virtual-Machine:~/classmates$ sudo docker run --rm -it --name=cf -v $(pwd)/inputs:/codeformer/inputs -v $(pwd)/results:/codeformer/results code-former -w 0 --bg_upsampler realesrgan --input_path inputs/
[sudo] jack 的密码:
Downloading: "https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/RealESRGAN_x2plus.pth" to /codeformer/weights/realesrgan/RealESRGAN_x2plus.pth
100%|██████████████████████████████████████████████████████████████████████████████| 64.0M/64.0M [00:11<00:00, 6.03MB/s]
/codeformer/inference_codeformer.py:45: RuntimeWarning: Running on CPU now! Make sure your PyTorch version matches your CUDA.The unoptimized RealESRGAN is slow on CPU. If you want to disable it, please remove `--bg_upsampler` and `--face_upsample` in command.
warnings.warn('Running on CPU now! Make sure your PyTorch version matches your CUDA.'
Face detection model: retinaface_resnet50
Background upsampling: True, Face upsampling: False
[1/1] Processing: 123.jpg
Grayscale input: True
detect 51 faces
All results are saved in results/inputs_0.0
jack@jack-Virtual-Machine:~/classmates$
I'm downloading the model each time I use RealESRGAN. Is it possible to predownload once then the model can be reached locally? If so, what should I execute into the terminal? Or how should the program be modified if it was designed to download everytime before use?
Yes, you can manually download pre-trained models from here: https://github.com/sczhou/CodeFormer/releases/tag/v0.1.0