Skip to content

Using CLIP and StyleGAN to generate faces from prompts.

License

Notifications You must be signed in to change notification settings

vipermu/StyleCLIP

Repository files navigation

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.

About

Using CLIP and StyleGAN to generate faces from prompts.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages