-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ImportError: DLL load failed while importing bias_act_plugin #88
Comments
Have you solved the problem? I have met the same question. |
I met this problem and was able to solve it:
|
i have exactly the same problems with you. i treid uninstall CUDA11.3 and pytorch1.10.2, but still doesn't work. is that problem with the verison? |
Hi is that mean you installed 2 verison of CUDA and then you uninstalled one of them? |
Yes, I uninstalled it because I don't need it anymore. But, if you can keep multiple CUDA versions, and assign 11.2 to CUDA_HOME in env. It still works |
before CUDA11.4,i installed CUDA10,x,but i have assigned CUDA11.4 to CUDA_HOME in env,and no 10.x in env path.i will try you advisement,thanks |
I have the same problem. Have you solved it?Looking forward to your reply! |
I recently found that VS2019 community edition doesn't work with StyleGAN3 but VS2022 does. Alas, using VS2022 required some small changes. In case anyone above is struggling, this change might help: |
I had CUDA 12.1. I uninstalled it and installed CUDA 11.8 from https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local. How did I know? It was based on the available CUDA versions available in this PyTorch website https://pytorch.org/get-started/locally/ and it solved the issue. |
I had the same issue, this worked for me. |
May I ask what version of torch you are using? I also installed cuda11.8, but it still does not work |
Describe the bug
ImportError: DLL load failed while importing bias_act_plugin: 找不到指定的模块。
To Reproduce
Steps to reproduce the behavior:
F:\Python39\python.exe F:/PycharmProjects/stylegan3-main/gen_images.py --outdir=out --trunc=1 --seeds=2 --network=./files/stylegan3-r-afhqv2-512x512.pkl
Loading networks from "./files/stylegan3-r-afhqv2-512x512.pkl"...
Generating image for seed 2 (0/1) ...
Setting up PyTorch plugin "bias_act_plugin"... Failed!
Traceback (most recent call last):
File "F:\PycharmProjects\stylegan3-main\gen_images.py", line 143, in
generate_images() # pylint: disable=no-value-for-parameter
File "F:\Python39\lib\site-packages\click\core.py", line 1128, in call
return self.main(*args, **kwargs)
File "F:\Python39\lib\site-packages\click\core.py", line 1053, in main
rv = self.invoke(ctx)
File "F:\Python39\lib\site-packages\click\core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "F:\Python39\lib\site-packages\click\core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "F:\PycharmProjects\stylegan3-main\gen_images.py", line 135, in generate_images
img = G(z, label, truncation_psi=truncation_psi, noise_mode=noise_mode)
File "F:\Python39\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "", line 503, in forward
File "F:\Python39\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "", line 143, in forward
File "F:\Python39\lib\site-packages\torch\nn\modules\module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "", line 92, in forward
File "F:\PycharmProjects\stylegan3-main\torch_utils\ops\bias_act.py", line 84, in bias_act
if impl == 'cuda' and x.device.type == 'cuda' and _init():
File "F:\PycharmProjects\stylegan3-main\torch_utils\ops\bias_act.py", line 41, in _init
_plugin = custom_ops.get_plugin(
File "F:\PycharmProjects\stylegan3-main\torch_utils\custom_ops.py", line 140, in get_plugin
torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir,
File "F:\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1124, in load
return _jit_compile(
File "F:\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1362, in _jit_compile
return _import_module_from_library(name, build_directory, is_python_module)
File "F:\Python39\lib\site-packages\torch\utils\cpp_extension.py", line 1752, in _import_module_from_library
module = importlib.util.module_from_spec(spec)
File "(frozen importlib._bootstrap)", line 565, in module_from_spec
File "(frozen importlib._bootstrap_external)", line 1173, in create_module
File "(frozen importlib._bootstrap)", line 228, in _call_with_frames_removed
ImportError: DLL load failed while importing bias_act_plugin: 找不到指定的模块。
Expected behavior
A clear and concise description of what you expected to happen.
Desktop (please complete the following information):
i have tried remove C:\Users{username}\AppData\Local\torch_extensions\torch_extensions\Cache\bias_act_plugin,but it not works
The text was updated successfully, but these errors were encountered: