ImportError: DLL load failed while importing _C: The specified procedure could not be found.
nitinmukesh opened this issue ยท 2 comments
๐ Bugs / Unexpected behaviors
I am trying to use a tool which have pytorch3d as dependency. As soon as I run the inference, following error occurs as stated in title.
Instructions To Reproduce the Issue:
Installed the following tool https://github.com/rlgnswk/NeRFFaceSpeech_Code
Installed pytorch3d using wheel
pip install "C:\WHEELS\pytorch3d-0.7.6+pt2.0.0cu117-cp310-cp310-win_amd64.whl"
No issues during installation.
Please include the following (depending on what the issue is):
- Any changes you made (
git diff
) or code you wrote
No
- The exact command(s) you ran:
python StyleNeRF/main_NeRFFaceSpeech_audio_driven_from_z.py --outdir=out_test --trunc=0.7 --network=pretrained_networks/ffhq_1024.pkl --test_data="test_data/test_audio/AdamSchiff_0.wav" --seeds=0
- What you observed (including the full logs):
(venv) C:\ai\NeRFFaceSpeech_Code>python StyleNeRF/main_NeRFFaceSpeech_audio_driven_from_z.py --outdir=out_test --trunc=0.7 --network=pretrained_networks/ffhq_1024.pkl --test_data="test_data/test_audio/AdamSchiff_0.wav" --seeds=0
Loading networks from "pretrained_networks/ffhq_1024.pkl"...
Setting up PyTorch plugin "bias_act_plugin"... Done.
C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\torch\functional.py:504: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at ..\aten\src\ATen\native\TensorShape.cpp:3191.)
return _VF.meshgrid(tensors, **kwargs) # type: ignore[attr-defined]
Setting up PyTorch plugin "upfirdn2d_plugin"... Done.
model [FaceReconModel] was created
loading the model from pretrained_networks/Deep3DFaceRecon_pytorch/face_recon\epoch_20.pth
create cuda ctx on device cuda:0
########################### audio2exp_model Loading Done #################################
Traceback (most recent call last):
File "C:\ai\NeRFFaceSpeech_Code\StyleNeRF\main_NeRFFaceSpeech_audio_driven_from_z.py", line 361, in <module>
generate_images() # pylint: disable=no-value-for-parameter
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\click\core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "C:\ai\NeRFFaceSpeech_Code\StyleNeRF\main_NeRFFaceSpeech_audio_driven_from_z.py", line 207, in generate_images
fitted_coeffs = fit_3dmm(outdir)
File "C:\ai\NeRFFaceSpeech_Code\StyleNeRF\audio2NeRF_utils.py", line 127, in fit_3dmm
from fit_single_img_custom import fit
File "C:\ai\NeRFFaceSpeech_Code\3DMM-Fitting-Pytorch\fit_single_img_custom.py", line 2, in <module>
from core.options import ImageFittingOptions
File "C:\ai\NeRFFaceSpeech_Code\3DMM-Fitting-Pytorch\core\__init__.py", line 1, in <module>
from core.BFM09Model import BFM09ReconModel
File "C:\ai\NeRFFaceSpeech_Code\3DMM-Fitting-Pytorch\core\BFM09Model.py", line 5, in <module>
from core.BaseModel import BaseReconModel
File "C:\ai\NeRFFaceSpeech_Code\3DMM-Fitting-Pytorch\core\BaseModel.py", line 5, in <module>
from pytorch3d.renderer import (
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\pytorch3d\renderer\__init__.py", line 7, in <module>
from .blending import (
File "C:\ai\NeRFFaceSpeech_Code\venv\lib\site-packages\pytorch3d\renderer\blending.py", line 10, in <module>
from pytorch3d import _C
ImportError: DLL load failed while importing _C: The specified procedure could not be found.
Please also simplify the steps as much as possible so they do not require additional resources to run, such as a private dataset.
(venv) C:\ai\NeRFFaceSpeech_Code>pip list
Package Version
------------------------ ------------------
antlr4-python3-runtime 4.9.3
audioread 3.0.1
backcall 0.2.0
certifi 2024.8.30
cffi 1.15.1
charset-normalizer 3.3.2
click 8.1.7
colorama 0.4.6
contourpy 1.3.0
cycler 0.11.0
decorator 5.1.1
docker-pycreds 0.4.0
easydict 1.13
einops 0.6.1
face-alignment 1.4.1
facenet-pytorch 2.5.3
fonttools 4.38.0
fvcore 0.1.5.post20221221
gitdb 4.0.11
GitPython 3.1.43
idna 3.10
imageio 2.31.2
imhist 0.0.4
importlib-metadata 6.7.0
imWatermark 0.0.2
invisible-watermark 0.2.0
iopath 0.1.10
ipdb 0.13.13
ipython 7.34.0
jedi 0.19.1
joblib 1.3.2
kiwisolver 1.4.5
kornia 0.6.12
lazy_loader 0.4
librosa 0.10.2.post1
llvmlite 0.39.1
lpips 0.1.4
matplotlib 3.9.2
matplotlib-inline 0.1.7
msgpack 1.0.5
natsort 8.4.0
networkx 2.6.3
ninja 1.11.1.1
numba 0.56.4
numpy 1.23.5
nvdiffrast 0.3.1
nvidia-cublas-cu11 11.10.3.66
nvidia-cuda-nvrtc-cu11 11.7.99
nvidia-cuda-runtime-cu11 11.7.99
omegaconf 2.3.0
opencv-python 4.10.0.84
packaging 24.0
parso 0.8.4
pexpect 4.9.0
pickleshare 0.7.5
pillow 10.4.0
pip 22.2.1
platformdirs 4.0.0
pooch 1.8.2
portalocker 2.10.1
prompt_toolkit 3.0.47
protobuf 4.24.4
psutil 6.0.0
ptyprocess 0.7.0
pycparser 2.21
Pygments 2.17.2
pyparsing 3.1.4
python-dateutil 2.9.0.post0
pytorch3d 0.7.6+pt2.0.0cu117
PyWavelets 1.3.0
pywin32 306
PyYAML 6.0.2
requests 2.31.0
safetensors 0.4.5
scikit-image 0.19.3
scikit-learn 1.0.2
scipy 1.14.1
sentry-sdk 2.14.0
setproctitle 1.3.3
setuptools 63.2.0
six 1.16.0
smmap 5.0.1
soundfile 0.12.1
soxr 0.3.7
tabulate 0.9.0
termcolor 2.4.0
threadpoolctl 3.1.0
tifffile 2021.11.2
tomli 2.0.1
torch 1.13.1+cu117
torchaudio 0.13.1+cu117
torchvision 0.14.1+cu117
tqdm 4.66.5
traitlets 5.9.0
trimesh 4.4.1
typing_extensions 4.12.2
urllib3 2.0.7
wandb 0.18.1
wcwidth 0.2.13
wheel 0.44.0
yacs 0.1.8
zipp 3.15.0
(venv) C:\ai\NeRFFaceSpeech_Code>nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2022 NVIDIA Corporation
Built on Tue_May__3_19:00:59_Pacific_Daylight_Time_2022
Cuda compilation tools, release 11.7, V11.7.64
Build cuda_11.7.r11.7/compiler.31294372_0
(venv) C:\ai\NeRFFaceSpeech_Code>python --version
Python 3.10.6
You have torch version 1.13.1 but your wheel for pytorch3d looks like it was built for torch version 2. 0.0. This must match for things to work.
Thank you.