• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created almost 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Using CLIP and StyleGAN to generate faces from prompts.

StyleCLIP

In this repo is the code used to generate face images from prompts in Generating Images from Prompts using CLIP and StyleGAN.

Envirionment setup

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

StyleGAN Weights

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.

Generate faces

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.