Open usamaa-saleem opened 1 year ago
The facelib is inside CodeFormer. So first you need to git clone as instruction below and install libraries required by Codeformer.
git lfs install
git clone https://huggingface.co/spaces/sczhou/CodeFormer
and add the dir into your path, then you can import it.
import sys
sys.path.append('./CodeFormer/CodeFormer')
@usamaa-saleem Hope this helps.
I did import the codeformer as well and did everything as require, but still getting this error.
Traceback (most recent call last): File "swapper.py", line 228, in <module> from restoration import * File "/home/ubuntu/inswapper/restoration.py", line 12, in <module> from facelib.utils.face_restoration_helper import FaceRestoreHelper ModuleNotFoundError: No module named 'facelib.utils'
I met the same error, do you solve it???
Yes, https://github.com/haofanwang/inswapper/issues/8#issuecomment-1690916472 this helped.
Yes, #8 (comment) this helped.
I command as follows: first, clone CodeFormer in the directory out of inswapper;
git lfs install
git clone https://huggingface.co/spaces/sczhou/CodeFormer
Then, in the file of restoration.py ,add the code as follow:
import sys
sys.path.append('../CodeFormer/CodeFormer')
But , I still meth the error: "No module named 'facelib.utils'"
So, do you make any other operations??
Try installing opencv-python==4.6.0.66
Try installing opencv-python==4.6.0.66
The same error. Too strange!!!
Yes, #8 (comment) this helped.
I command as follows: first, clone CodeFormer in the directory out of inswapper;
git lfs install git clone https://huggingface.co/spaces/sczhou/CodeFormer
Which operating system is this? Was the git lfs install
command actually successful? Usually it requires the git-lfs
package to be installed in your Operating System.
On Ubuntu Linux:
sudo apt update
sudo apt -y install git-lfs
On Mac:
brew install git-lfs
Yes, #8 (comment) this helped.
I command as follows: first, clone CodeFormer in the directory out of inswapper;
git lfs install git clone https://huggingface.co/spaces/sczhou/CodeFormer
Which operating system is this? Was the
git lfs install
command actually successful? Usually it requires thegit-lfs
package to be installed in your Operating System.On Ubuntu Linux:
sudo apt update sudo apt -y install git-lfs
On Mac:
brew install git-lfs
Thank you!!
I did import the codeformer as well and did everything as require, but still getting this error.
Traceback (most recent call last): File "swapper.py", line 228, in <module> from restoration import * File "/home/ubuntu/inswapper/restoration.py", line 12, in <module> from facelib.utils.face_restoration_helper import FaceRestoreHelper ModuleNotFoundError: No module named 'facelib.utils'