Spaces:
Running
Running
Setup
- Install anaconda or miniconda
- Install git, then clone respository:
git clone https://github.com/harskish/ganspace/
- Create environment:
conda create -n ganspace python=3.7
- Activate environment:
conda activate ganspace
- Install dependencies:
conda env update -f environment.yml --prune
- Setup submodules:
git submodule update --init --recursive
- Run command
python -c "import nltk; nltk.download('wordnet')"
Interactive viewer
The interactive viewer (interactive.py) has the following dependencies:
- Glumpy
- PyCUDA with OpenGL support
Windows
Install included dependencies (downloaded from https://www.lfd.uci.edu/~gohlke/pythonlibs/):
pip install deps/windows/*
Linux
- Install CUDA toolkit (match the version in environment.yml)
- Download pycuda sources from: https://pypi.org/project/pycuda/#files
- Extract files:
tar -xzf pycuda-VERSION.tar.gz
- Configure:
python configure.py --cuda-enable-gl --cuda-root=/path/to/cuda
- Compile and install:
make install
- Install Glumpy:
pip install setuptools cython glumpy
StyleGAN2 setup (optional)
StyleGAN2 contains custom CUDA kernels for improved performance.
Less performant native PyTorch fallbacks are used by default.
- Install CUDA toolkit (match the version in environment.yml)
- On Windows: install and open 'x64 Native Tools Command Prompt for VS 2017'
conda activate ganspace
cd models/stylegan2/stylegan2-pytorch/op
python setup.py install
- Test:
python -c "import torch; import upfirdn2d_op; import fused; print('OK')"