XingangPan / DragGAN

Official Code for DragGAN (SIGGRAPH 2023)
https://vcai.mpi-inf.mpg.de/projects/DragGAN/
Other
35.7k stars 3.45k forks source link

报错 Error building extension 'bias_act_plugin',,,ImportError: DLL load failed while importing bias_act_plugin: 找不到指定的模块。 #146

Open jxadcx opened 1 year ago

jxadcx commented 1 year ago

image image image

raptyk commented 1 year ago

same here...

` (stylegan3) C:\Projekty\AI\DragGAN>.\scripts\gui.bat Loading "C:\Projekty\AI\DragGAN\checkpoints\stylegan2_lions_512_pytorch.pkl"... Done. () {'z_dim': 512, 'c_dim': 0, 'w_dim': 512, 'img_resolution': 512, 'img_channels': 3, 'mapping_kwargs': {'num_layers': 8, 'embed_features': None, 'layer_features': None, 'activation': 'lrelu', 'lr_multiplier': 0.01, 'w_avg_beta': 0.995}, 'synthesis_kwargs': {'channel_base': 32768, 'channel_max': 512, 'num_fp16_res': 0, 'conv_clamp': None, 'architecture': 'skip', 'resample_filter': [1, 3, 3, 1], 'use_noise': True, 'activation': 'lrelu'}} Setting up PyTorch plugin "bias_act_plugin"... Failed!

Traceback (most recent call last): File "C:\Projekty\AI\DragGAN\viz\renderer.py", line 112, in render self.init_network(res, args) File "C:\Projekty\AI\DragGAN\viz\renderer.py", line 249, in init_network w = G.mapping(z, label, truncation_psi=trunc_psi, truncation_cutoff=trunc_cutoff) File "C:\Users\Patryk.conda\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(*args, *kwargs) File "C:\Projekty\AI\DragGAN\training\networks_stylegan2.py", line 247, in forward x = layer(x) File "C:\Users\Patryk.conda\envs\stylegan3\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl return forward_call(args, kwargs) File "C:\Projekty\AI\DragGAN\training\networks_stylegan2.py", line 125, in forward x = bias_act.bias_act(x, b, act=self.activation) File "C:\Projekty\AI\DragGAN\torch_utils\ops\bias_act.py", line 84, in bias_act if impl == 'cuda' and x.device.type == 'cuda' and _init(): File "C:\Projekty\AI\DragGAN\torch_utils\ops\bias_act.py", line 41, in _init _plugin = custom_ops.get_plugin( File "C:\Projekty\AI\DragGAN\torch_utils\custom_ops.py", line 136, in get_plugin torch.utils.cpp_extension.load(name=module_name, build_directory=cached_build_dir, File "C:\Users\Patryk.conda\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1284, in load return _jit_compile( File "C:\Users\Patryk.conda\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1535, in _jit_compile return _import_module_from_library(name, build_directory, is_python_module) File "C:\Users\Patryk.conda\envs\stylegan3\lib\site-packages\torch\utils\cpp_extension.py", line 1929, in _import_module_from_library module = importlib.util.module_from_spec(spec) File "", line 565, in module_from_spec File "", line 1173, in create_module File "", line 228, in _call_with_frames_removed ImportError: DLL load failed while importing bias_act_plugin: Nie można odnaleźć określonego modułu. `

image

raptyk commented 1 year ago

solved by uninstalling latest CUDA 12.x and installing CUDA 11.8 download CUDA 11.8 here: https://developer.nvidia.com/cuda-11-8-0-download-archive?target_os=Windows&target_arch=x86_64&target_version=11&target_type=exe_local

BulatGazizov commented 1 year ago

Tried this solution - did not help. Still same error. Windows 11.