omertov / encoder4editing

Official implementation of "Designing an Encoder for StyleGAN Image Manipulation" (SIGGRAPH 2021) https://arxiv.org/abs/2102.02766
MIT License
940 stars 154 forks source link

Is it possible to run on Windows? #18

Closed HelixNGC7293 closed 3 years ago

HelixNGC7293 commented 3 years ago

Greetings!~

I'm just wondering if there is a way to run e4e on Windows.

Currently I'm keep getting this error when trying.. (Win10 with CUDA 10.2)

File "C:\Tools\Code\anaconda3\envs\StyleCLIP\lib\site-packages\torch\utils\cpp_extension.py", line 1539, in _run_ninja_build env=env) File "C:\Tools\Code\anaconda3\envs\StyleCLIP\lib\subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

TomatoBoy90 commented 3 years ago

It seem so hard,because many env cannot installed on windows.

yuval-alaluf commented 3 years ago

Running on windows is tricky since you need to compile various CUDA extensions that are used in the StyleGAN implementation. In the following thread I provided links to a few issues that may be of use: https://github.com/eladrich/pixel2style2pixel/issues/29

DKaravolos commented 3 years ago

Thanks @yuval-alaluf! I managed to make it work with that second suggestion in your link: https://github.com/rosinality/stylegan2-pytorch/issues/47

I used this guide to compile it once and for all instead of every time: https://animadversio.github.io/tech_note/debugging-stylegan2 There are some version discrepancies. But it works with PyTorch version 1.6 and Cuda 10.1 (i.e., versions used in this repo).