Last active
July 8, 2023 16:34
-
-
Save jgwill/25a81f5e72e00d425ba9891330a61a29 to your computer and use it in GitHub Desktop.
giaupscayl-prototyping-2307-infraless
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_file=test-img-lowres.jpg | |
output_base=_test-img-lowres-upres-gia | |
model_name="realesrgan-x4plus-anime" | |
#Init | |
sudo mkdir -p -m 777 /repos | |
cd /repos && git clone https://github.com/GuillaumeAI/giar-Real-ESRGAN.git \ | |
&& cd giar-Real-ESRGAN | |
# Python version | |
python --version | |
# SETUP see : https://gist.github.com/jgwill/77178d1ab8499af65cc88ed4dec39b4d | |
# Test UPSCAYL | |
python inference_realesrgan.py -n $model_name -i $input_file -o $output_base'-pyori.png' --tile 100 | |
python gia_inference_realesrgan.py -i $input_file -o $output_base'-pygia.png' | |
####################################################################################### | |
# Test with bin/realsrgan/realesrgan-ncnn-vulkan | |
mkdir -p -m 777 /repos | |
cd /repos && git clone https://github.com/GuillaumeAI/gia-upscayl.git \ | |
&& cd gia-upscayl | |
model_path=$(pwd)/bin/realsrgan/models | |
## Working ?? | |
bin/realsrgan/realesrgan-ncnn-vulkan \ | |
&& echo "WORKING :)" || echo " NOT WORKING :(" | |
bin/realsrgan/realesrgan-ncnn-vulkan \ | |
-i $input_file \ | |
-o $output_base'-bin-realsrgan-vulkan.png' \ | |
-n $model_name \ | |
-m $model_path \ | |
-v | |
# Test with : resources/linux/bin/upscayl-realesrgan | |
model_path=$(pwd)/resources/linux/bin/upscayl-realesrgan/models | |
# working ?? | |
resources/linux/bin/upscayl-realesrgan \ | |
&& echo "WORKING :)" || echo "resources/linux/bin/upscayl-realesrgan NOT WORKING :(" | |
resources/linux/bin/upscayl-realesrgan \ | |
-i $input_file \ | |
-o $output_base'-resource-linux-oribin-upscayl.png' \ | |
-n $model_name \ | |
-m $model_path \ | |
-v |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#REF : https://techviewleo.com/how-to-install-python-on-amazon-linux-2/?expand_article=1 | |
sudo yum update -y | |
sudo yum groupinstall "Development Tools" -y | |
sudo yum erase openssl-devel -y | |
sudo yum install openssl11 openssl11-devel libffi-devel bzip2-devel wget -y | |
# Download and build python | |
cd | |
wget https://www.python.org/ftp/python/3.10.4/Python-3.10.4.tgz | |
tar -xf Python-3.10.4.tgz \ | |
&& cd Python-3.10.4/ \ | |
&& ./configure --enable-optimizations \ | |
&& make -j $(nproc) \ | |
&& sudo make altinstall | |
python3.10 --version | |
Building the Python 3.10 to see if that will works.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Amazon linux
bin/realsrgan/realesrgan-ncnn-vulkan: error while loading shared libraries: libvulkan.so.1: cannot open shared object file: No such file or directory
NOT WORKING :(