Closed user799595 closed 1 year ago
The reason is it requires numpy-1.20.3 which is unsupported with the python version required for this repo.
Here is a temporary fix until cog.yaml file is fixed on GFPGAN's repo.
Clone gfpgan repo and install locally:
git clone git@github.com:TencentARC/GFPGAN.git
cd GFPGAN
pip install basicsr facexlib
pip install -r requirements.txt
python setup.py develop
Then you can run pip install realesrgan
successfully.
I was able to switch to python 3.10.4 with no problems:
diff --git a/environment-mac.yaml b/environment-mac.yaml
index 44cd1ef..c0cc6ca 100644
--- a/environment-mac.yaml
+++ b/environment-mac.yaml
@@ -3,7 +3,7 @@ channels:
- pytorch-nightly
- conda-forge
dependencies:
- - python==3.9.13
+ - python==3.10.4
- pip==22.2.2
# pytorch-nightly, left unpinned
Then I ran:
conda env update -f environment-mac.yaml --prune
@cgodley numpy-1.20.3 doesn't seem to work any better with 3.10.4 for me
Here is a temporary fix until cog.yaml file is fixed on GFPGAN's repo.
Clone gfpgan repo and install locally:
git clone git@github.com:TencentARC/GFPGAN.git cd GFPGAN pip install basicsr facexlib pip install -r requirements.txt python setup.py develop
Then you can run
pip install realesrgan
successfully.
This fixed the installation error for me, thank you.
try using the requirements.txt setup here: https://github.com/lstein/stable-diffusion/issues/302#issue-1359489755
Thanks @stillmatic
Did you ever figure out the RuntimeError: expected scalar type BFloat16 but found Float
error?
RuntimeError: expected scalar type BFloat16 but found Float
is fixed by #319
Looks like it tries to build numpy from source.
Build output (too long to include here): https://gist.github.com/user799595/7544428976415caa49fc134edaa8cb4d
Related: https://github.com/xinntao/Real-ESRGAN/issues/425