Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'mxnet' #76

Open
ilyastoletov opened this issue Apr 29, 2023 · 2 comments
Open

ModuleNotFoundError: No module named 'mxnet' #76

ilyastoletov opened this issue Apr 29, 2023 · 2 comments

Comments

@ilyastoletov
Copy link

anydesk00002

I have got this error after installing all dependencies and downloading required weights. I can't install mxnet library itself because breaks dependency chain: mxnet requires numpy less than 1.17.0 version, but much of other libraries requires numpy of greater versions (greater than 1.17.0). This what i got after trying to install mxnet library:

anydesk00003

Using Windows 10

@AlexanderGroshev
Copy link
Collaborator

Hi, @nagibator-hero!

The first thing you need to do is to determine the version of the CUDA with the command nvcc --version.
Then install the correct version of mxnet with source 1 or source 2.
requirements.txt corresponds to CUDA 10.1.
To find the correct version of mxnet you can look at #56, #60 or try solution with docker #51.

@battlesaint
Copy link

battlesaint commented Jun 8, 2023

For Windows

  1. install anaconda, visual studio tools 2019, 2022 with c++ development checked

    Cuda v10.1 here

    Cudnn v8.0.5 here

    Extract cudnn, copy all and paste to C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1

  2. open up anaconda prompt, conda create -n sber python=3.6

  3. conda activate sber

  4. cd F:\AI\ghost (where you want to download)

  5. git clone https://github.com/sberbank-ai/sber-swap.git
    cd sber-swap
    git submodule init
    git submodule update

    (one by one)

  6. pip install -r requirements.txt

    if error, change requests==2.18.4

  7. download models and move to the right directory
    here

  8. Open model_zoo.py from C:\Users(username)\anaconda3\envs\sber\Lib\site-packages\insightface\model_zoo and edit line 23

    def get_model(self):
    session = onnxruntime.InferenceSession(self.onnx_file, providers=none)

    to

    def get_model(self):
    session = onnxruntime.InferenceSession(self.onnx_file, providers=['TensorrtExecutionProvider', 'CUDAExecutionProvider'])

  9. test and enjoy
    python inference.py --source_paths {PATH_TO_IMAGE} --target_faces_paths {PATH_TO_IMAGE} --target_video {PATH_TO_VIDEO}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants