StyleGAN_CLIP harnesses the combined capabilities of StyleGAN2-ADA and CLIP to enable image creation, manipulation, and exploration. It primarily integrates with StyleGAN for seamless image synthesis. Additionally, it incorporates a unique algorithm for latent vector editing with CLIP, significantly expanding the creative possibilities for StyleGAN-generated content. The enhanced code featuring a graphical user interface (GUI) can be accessed here.
Go to the project path and follow the instructions:
- Install CUDA 11.8
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
git clone https://github.com/NVlabs/stylegan3
git clone https://github.com/openai/CLIP
pip install -e ./CLIP
pip install einops ninja
pip install -r requirements.txt
- for other dependency check https://github.com/ouhenio/StyleGAN3-CLIP-notebooks
This project is specifically designed and tested with the StyleGAN2 pretrained model from the StyleGAN3 repository.
- Download the pretrained StyleGAN2 model (in .pkl format) from the StyleGAN3 repository or use a custom one.
- Move the downloaded .pkl file to the main path of the StyleGAN_CLIP implementation.
- Update the name of the model file in the code to match the newly placed .pkl file and adjust parameters.
- Run with
python main.py
- StyleGAN3CLIP, from Ouhenio
- stylegan3, from NVlabs
- CLIP, from OpenAI