Open wmcnamara opened 7 months ago
The same error as above run "python app.py" , my environment: Windows 11 x64 Visual Studio 2019, all PATH / LIB / include parameter seted. and this enviroment to run CUDA compile is ok for example OOTDiffusion project and other's. ‘cl’ command run ok:
D:\AITest\InstantMesh>cl 用于 x64 的 Microsoft (R) C/C++ 优化编译器 19.29.30148 版 版权所有(C) Microsoft Corporation。保留所有权利。
用法: cl [ 选项... ] 文件名... [ /link 链接选项... ]
supplement: just now, according to https://nvlabs.github.io/nvdiffrast/#windows docement, i try to run "python triangle.py --cuda" in the same terminal window, it's run ok and produced the image as below: is this means the package "nvdiffrast" install is no problem?
haha... after I finished run the sample test of nvdiffrast's python script "triangle.py", I find the nvdiffrast_plugin library in the torch_extensions cache directory “C:\Users\Administrator\AppData\Local\torch_extensions\torch_extensions\Cache\py310_cu121\nvdiffrast_plugin” as below:
then I run the app.py again, working fine, I think may be it was recompile during my testing above. the file's timestamp also proofed it did compile twice, then may be the first time when I install the requirement.txt, the nvdiffrast's wheel build have some error but wasn't any warning...below is the log message:
Building wheels for collected packages: diffusers, nvdiffrast Building wheel for diffusers (pyproject.toml) ... done Created wheel for diffusers: filename=diffusers-0.20.2-py3-none-any.whl size=1342627 sha256=4317a52ec7c0e3efa4f689f2bc93489ce075494c4fe36c0debc339dcd8aed419 Stored in directory: c:\users\administrator\appdata\local\pip\cache\wheels\86\7f\62\8d24bc8f23ae7fa8fa72c981ce769844f6aa2098b0587a63ba Building wheel for nvdiffrast (pyproject.toml) ... done Created wheel for nvdiffrast: filename=nvdiffrast-0.3.1-py3-none-any.whl size=141468 sha256=6438b8f63727e74d7eef28a20fc513d7db3a626a6f85e2977732d1e62d11694d Stored in directory: C:\Users\Administrator\AppData\Local\Temp\pip-ephem-wheel-cache-mfe8hywg\wheels\3e\83\20\219395b9ff5d75f2171869aeaaaa093303dcfd2c92dd5597c0 Successfully built diffusers nvdiffrast
@wikeeyang i am also facing the same issue as below do i need to set the env variable also >?
line 2136, in _import_module_from_library
module = importlib.util.module_from_spec(spec)
File "
@wikeeyang i am also facing the same issue as below do i need to set the env variable also >? line 2136, in _import_module_from_library module = importlib.util.module_from_spec(spec) File "", line 571, in module_from_spec File "", line 1176, in create_module File "", line 241, in _call_with_frames_removed ImportError: DLL load failed while importing nvdiffrast_plugin: The specified module could not be found. @sumanttyagi due to this project need nvidia nvdiffrast package, this package need ninja to compile pytorch + cua DLL library base local enviroment, then, when you install nvdiffrast from source or from requirement.txt, you need C++ compile enviroment, gcc/g++/cmake for linux, and Microsoft Visual Studio build tools enviroment for windows, and in windows, you need plus some env parameter like LIB/INCLUDE and PATH for “cl.exe”, then ninja can invoke command line compile for nvdiffrast package local. back to the error message, should be the nvdiffrast_plugin DLL can't compiled successe, you need check and prepare for your enviroment first.
@wikeeyang can't we create env through anaconda environment following the steps provided on repo? also can you elaborate this steps need plus some env parameter like LIB/INCLUDE and PATH for “cl.exe”, then ninja can invoke command line compile for nvdiffrast package local. . Please provide the sample of the steps in detail which need to setup the env,
@wikeeyang can't we create env through anaconda environment following the steps provided on repo? also can you elaborate this steps need plus some env parameter like LIB/INCLUDE and PATH for “cl.exe”, then ninja can invoke command line compile for nvdiffrast package local. . Please provide the sample of the steps in detail which need to setup the env,
@sumanttyagi I don't know your enviroment, and don't know config with anaconda, for this, you can prefer the issue#3
in my Windows 11 x64 + Visual Studio 2019 + Windows Kits 10 enviroment, the PATH/LIB/INCLUDE as below:
PATH: append your "cl.exe" file path to %PATH%,like C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64; %PATH%
LIB: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\ucrt\x86;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x64;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.19041.0\um\x86;
INCLUDE: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include;C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt;C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\shared;
you need modify it according to your version...
when you compete above setting, pls goto the directory like "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build" to find "vcvarsall.bat" or "vcvars64.bat", and click right buttom to open CMD windows, to run like this "vcvarsall.bat x86_amd64 10.0.19041.0 -vcvars_ver=14.29" to config the Microsoft C++ command line compile enviroment. for this, you can refer this page for more detail information.
https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-160
but we use the command line to # Install the correct version of CUDA conda install cuda -c nvidia/label/cuda-12.1.0
it will be inside the conda lib package right not here INCLUDE: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.1\include
have you installed the cuda separately ? without using command ?
@wikeeyang is it important to install the cuda toolkit 12.1 separately ? or this command is enough conda install cuda -c nvidia/label/cuda-12.1.0
Hello! When running the model I am recieving a DLL load error.
ImportError: DLL load failed while importing nvdiffrast_plugin: The specified module could not be found.
The entire log is as follows:
Any ideas how this could happen? Did I miss a porgram that must be installed?