Skip to content

Latest commit

 

History

History
66 lines (53 loc) · 2.69 KB

StyleGAN-GCP.md

File metadata and controls

66 lines (53 loc) · 2.69 KB

Instructions for installing StyleGAN2 libraries on GCP

These instructions are for my StyleGAN2 Deep Dive course. This will get you set up with three different versions of the StyleGAN2 library on GCP.

Set up GCP

Please follow this video to set up your GCP Virtual Machine.

Once you have a VM set up, log in using SSH and follow the below instructions (a video is also available)

Set up Anaconda

wget -c https://repo.continuum.io/archive/Anaconda3-2020.02-Linux-x86_64.sh

bash Anaconda3-2020.02-Linux-x86_64.sh

rm Anaconda3-2020.02-Linux-x86_64.sh

exec bash

conda create --name stylegan python=3.7

conda activate stylegan

Install Repositories

wget https://raw.githubusercontent.com/dvschultz/ai/master/install-stylegan2.sh

bash install-stylegan2.sh

Run StyleGAN2 test

cd dvschultz-stylegan2/stylegan2

python run_generator.py generate-images --network=./results/00000-pretrained/network-snapshot-10000.pkl --seeds=6600-6625 --truncation-psi=0.5

If your CLI returns the following you have successfully installed everything

Local submit - run_dir: results/00001-generate-images
dnnlib: Running run_generator.generate_images() on localhost...
Loading networks from "./results/00000-pretrained/network-snapshot-10000.pkl"...
Setting up TensorFlow plugin "fused_bias_act.cu": Preprocessing... Compiling... Loading... Done.
Setting up TensorFlow plugin "upfirdn_2d.cu": Preprocessing... Compiling... Loading... Done.
Generating image for seed 6600 (0/26) ...
Generating image for seed 6601 (1/26) ...
Generating image for seed 6602 (2/26) ...
Generating image for seed 6603 (3/26) ...
Generating image for seed 6604 (4/26) ...
Generating image for seed 6605 (5/26) ...
Generating image for seed 6606 (6/26) ...
Generating image for seed 6607 (7/26) ...
Generating image for seed 6608 (8/26) ...
Generating image for seed 6609 (9/26) ...
Generating image for seed 6610 (10/26) ...
Generating image for seed 6611 (11/26) ...
Generating image for seed 6612 (12/26) ...
Generating image for seed 6613 (13/26) ...
Generating image for seed 6614 (14/26) ...
Generating image for seed 6615 (15/26) ...
Generating image for seed 6616 (16/26) ...
Generating image for seed 6617 (17/26) ...
Generating image for seed 6618 (18/26) ...
Generating image for seed 6619 (19/26) ...
Generating image for seed 6620 (20/26) ...
Generating image for seed 6621 (21/26) ...
Generating image for seed 6622 (22/26) ...
Generating image for seed 6623 (23/26) ...
Generating image for seed 6624 (24/26) ...
Generating image for seed 6625 (25/26) ...
dnnlib: Finished run_generator.generate_images() in 1m 45s.