LaurentMazare / diffusers-rs

An implementation of the diffusers api in Rust
Apache License 2.0
539 stars 55 forks source link

STATUS_DLL_NOT_FOUND #75

Closed Cyril-Cf closed 1 year ago

Cyril-Cf commented 1 year ago

Hello, I'm a window user trying to enable CUDA in my otherwise functionning app, I have installed locally PyTorch 2.0.0 + the NVIDIA packages, and I can check in a python terminal that CUDA is enabled (torch.cuda.is_available() give me True). My current problem has to do with Windows 11 it seems, I get this error when trying to launch a cargo run : exit code: 0xc0000135, STATUS_DLL_NOT_FOUND

The program doesn't even launch, so the main isn't called and I can't debug anything beyond that stage. I'm trying to read about this error but I could use some help, I understand that I have to download and install missing DLL, but which one to target? Did anyone have the same problem and could give me a hint about how to solve this issue ?

Thanks!

Cyril-Cf commented 1 year ago

EDIT : I found a solution that worked for me, 2 dll files were actually missing (you can check their names if you try to directly launch the .exe file in the ./target/debug folder). In my case, torch_cpu.dll and c10.dll were missing.

I searched for them on my system and added their path to the PATH env variable ('C:\Python311\Lib\site-packages\torch\lib' on my PC). Worked like a charmed!