Xingang Pan · Ayush Tewari · Thomas Leimkühler · Lingjie Liu · Abhimitra Meka · Christian Theobalt
If you have CUDA graphic card, please follow the requirements of NVlabs/stylegan3.
The usual installation steps involve the following commands, they should set up the correct CUDA version and all the python packages
conda env create -f environment.yml
conda activate stylegan3
Then install the additional requirements
pip install -r requirements.txt
Otherwise (for GPU acceleration on MacOS with Silicon Mac M1/M2, or just CPU) try the following:
cat environment.yml | \
grep -v -E 'nvidia|cuda' > environment-no-nvidia.yml && \
conda env create -f environment-no-nvidia.yml
conda activate stylegan3
# On MacOS
export PYTORCH_ENABLE_MPS_FALLBACK=1Provided docker image is based on NGC PyTorch repository. To quickly try out visualizer in Docker, run the following:
# before you build the docker container, make sure you have cloned this repo, and downloaded the pretrained model by `python scripts/download_model.py`.
docker build . -t draggan:latest
docker run -p 7860:7860 -v "$PWD":/workspace/src -it draggan:latest bash
# (Use GPU)if you want to utilize your Nvidia gpu to accelerate in docker, please add command tag `--gpus all`, like:
# docker run --gpus all -p 7860:7860 -v "$PWD":/workspace/src -it draggan:latest bash
cd src && python visualizer_drag_gradio.py --listenNow you can open a shared link from Gradio (printed in the terminal console).
Beware the Docker image takes about 25GB of disk space!
To download pre-trained weights, simply run:
python scripts/download_model.py
If you want to try StyleGAN-Human and the Landscapes HQ (LHQ) dataset, please download weights from these links:
