NVlabs / stylegan3

Official PyTorch implementation of StyleGAN3
Other
6.38k stars 1.12k forks source link

Solving Setting up PyTorch plugin "bias_act_plugin"... Failed. missing *.so #165

Open zhouha24 opened 2 years ago

zhouha24 commented 2 years ago

Describe the bug ubuntu 20.04 When I was executing

python gen_images.py --outdir=out --trunc=1 --seeds=2 \
    --network=https://api.ngc.nvidia.com/v2/models/nvidia/research/stylegan3/versions/1/files/stylegan3-r-afhqv2-512x512.pkl

I got ImportError with missing 'bias_act_plugin.so'. Following Troubleshooting I found two errors in 'cpp_extensions.py' that caused this bug: on line 1890 which causes in 'build.ninja', "nvcc = :/usr/local/cuda/bin/nvcc" config.append(f"nvcc = {nvcc}") and on line 1631 which causes missing '*.so' command = ['ninja', '-v'] How To Fix this Change line 1890 to config.append(f"nvcc = {nvcc[1:]}") and line 1631 to command = ['ninja']

nurpax commented 2 years ago

The cpp_extensions.py file is from PyTorch, right? Mind filing a bug against https://github.com/pytorch/pytorch if you think this is clearly a bug in PyTorch?

Fortunate-1006 commented 2 years ago

I made the same mistake as you, but according to your method, I still haven't solved this mistake

samwang90 commented 2 years ago

I made the same mistake as you, but according to your method, I still haven't solved this mistake

if you check ninja command 'ninja --help' you can see '-v' means '--verbose'. Change '-v' in line 1631 to '--verbose' it should work.

SanaNazari commented 2 years ago

This doesn't work either

festinais commented 2 years ago

nothing works!

MoHUMOHo commented 1 year ago

you can use '--version' instead of '-v'