Context
Here are some articles talking about what we've been doing that provide some context and info on what is happening behind the scenes:
Alien Dreams: An Emerging Art Scene
VICE: AI Generated Art Scene Explodes as Hackers Create Groundbreaking New Tools
VQGAN + CLIP How Does it Work?
Generating AI “Art” with VQGAN+CLIP
Tech
First, all of your images have to be RGB. They can't be Indexed Color, etc. So, I set up a Photoshop Action that converts any image to RGB color. Then, open File->Automate->Batch... and select your action. Tell it to override open and save dialogs and it will convert whatever folder of images you give it to RGB. IF you know your images are already RGB, then you don't have to preprocess them like this.
Next, you need to prepare the images into a "dataset" using the dataset_tool.py
This app will resize your images to powers of 2, so, 256x256, 512x512, 1024x1024, etc.
You can give it a single directory or nested directories (so, "insects" or "butterfly, etc.)
Code: Select all
python dataset_tool.py --source=insects/Butterfly/ --dest=datasets/butterflys-256x256.zip --resolution=256x256
Code: Select all
hgator
cd to your working directory
Code: Select all
cd blue_art4612/share/students/<whatever>
and load the Anaconda module
Code: Select all
module load conda
Code: Select all
conda env create -f environment.yml
Activate your conda environment
Code: Select all
conda activate stylegan3
Code: Select all
conda install psutil (this should be added to environment.yml)
Load a Cuda and GCC (compiler)
Code: Select all
module load cuda/11.1.0
module load gcc
Let's save our current list of modules so we can simply recall them all the next time we log in:
Code: Select all
module save sgan3
Code: Select all
module restore sgan3
If you log in and can't recall the name of the module list you created:
Code: Select all
module savelist
See here for more detail:
https://www.chpc.utah.edu/documentation ... vanced.php
Now we need to grab a GPU or two:
Code: Select all
srun -p gpu --gpus=a100:2 --mem=160gb --pty -u -A art4612 -q art4612 bash -i
And, now we need to initiate our training. Here I set "worker" to 2 since by default it's 3 and will work but give errors:
Code: Select all
python train.py --outdir=training-runs --cfg=stylegan3-t --data=datasets/butterflys-256x256.zip --gpus=2 --batch=24 --workers=2 --gamma=8.2 --mirror=1
YEAH, WE'RE TRAINING