In this repo is the code used to generate face images from prompts in Generating Images from Prompts using CLIP and StyleGAN.
After cloning this repo, enter into the StyleCLIP folder and run the following command to create a new conda environment named "styleclip" with all the required packages.
conda env create -f environment.yml
Download the .pt
file from here and store it inside the folder of this repo with the name karras2019stylegan-ffhq-1024x1024.for_g_all.pt
.
Run the following command to generate a face with a custom prompt. In this case the prompt is "The image of a woman with blonde hair and purple eyes"
python clip_generate.py --prompt "The image of a woman with blonde hair and purple eyes"
The results will be stored under the folder generations
with the name of the prompt that you have entered.