Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Setting up PyTorch plugin "bias_act_plugin"... Failed! #22

Open
IceTea42 opened this issue Apr 4, 2022 · 7 comments
Open

Setting up PyTorch plugin "bias_act_plugin"... Failed! #22

IceTea42 opened this issue Apr 4, 2022 · 7 comments

Comments

@IceTea42
Copy link

IceTea42 commented Apr 4, 2022

Hi, I am at the step "render the pretrained model" and I get an error related to "bias_act_plugin". I tried the suggestions below without success. Do you have any suggestions for this kind of error ?

the error message:
python generate.py --outdir=/home/user/codes/public/StyleNeRF/out --trunc=0.7 --seeds=0 --network=/home/user/codes/public/StyleNeRF/pretrained/ffhq_512.pkl --render-program="rotation_camera"
Loading networks from "/home/user/codes/public/StyleNeRF/pretrained/ffhq_512.pkl"...
Generating image for seed 0 (0/1) ...
Setting up PyTorch plugin "bias_act_plugin"... Failed!
Traceback (most recent call last):
File "/home/user/miniconda3/envs/stylenerf/lib/python3.7/site-packages/torch/utils/cpp_extension.py", line 1539, in _run_ninja_build
env=env)
File "/home/user/miniconda3/envs/stylenerf/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

my environment:
OS: Ubuntu 18.04.6 LTS (bionic)
gpu: Nvidia GeForce RTX 2060 (only one)
conda env: conforms exactly to ./requirements.txt (python=3.7.12, torch=1.7.1, ...)
cuda version: I have multiple cuda but the used one has the version 10.1.105
(cat /usr/local/cuda/version.txt)
gcc version: 11.2.0, g++ version: 11.2.0

related suggestions that I found but didn't work for me:
NVlabs/stylegan2-ada-pytorch#39 (reinstall ninja)
NVlabs/stylegan3#124 (gcc, VS version)

@techie02
Copy link

techie02 commented May 1, 2022

@IceTea42
I also encountered the same issue. I am getting this error when using CUDA=10.2. It seems the CUDA version might be contributing to the error. Where you able to fix this error ?

@marianbasti
Copy link

marianbasti commented May 1, 2022 via email

@IceTea42
Copy link
Author

IceTea42 commented May 6, 2022

@marianobasti Thanks for the suggestion.

@techie02 I haven't tried to re-debug this for a while. But recently for another reason I upgraded my OS version and wanted to retry. At the end, it was not at all due to OS change or anything like: The pytorch version used here is 1.7.1. From this page ( https://pytorch.org/get-started/previous-versions/ ) I found out that the most recent cuda version compatible with pytorch1.7.1 is cuda 11.0.
For personal preferences I use conda environments oftentimes. In order to test this repo, by slightly modifying the requirements.txt to a env.yml file I already had a conda environment with which I am testing. I just installed cuda=11.0 on the same environment ( like this: conda install cudatoolkit=11.0 -c pytorch ) and it succeded. By installing it into an environment, I doesn't impact or use the cuda that you directly installed on your machine. No more errors, I could see the generated images and a .mp4 video. Hope this works for you as well.

@zhywanna
Copy link

running ninja from there

@marianobasti how to running ninja from there? I found a build.ninja there

@marianbasti
Copy link

marianbasti commented May 26, 2022 via email

@techie02
Copy link

@IceTea42 @marianobasti
I was also able to run the training successfully after upgrading the CUDA version to 11.0. I am training on compcars dataset. I was wondering why the car logo of the generated images does not resemble any of the real car logos e.g, the four rings in Audi is not reconstructed in any of the generated images. If anyone has tried generating car images please share your thoughts.

@linzhi-li
Copy link

I struggled for a whole day to get rid of the same error.
Finally, I gave up in modifying my environmen, and strictly install the packages listed in the requirements.txt. After substituting the torch and torchvision with 1.11.0&0.12.0+cu115, reinstalling ninja and checking the latest VS++, the repo worked.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants