vipermu / StyleCLIP

Using CLIP and StyleGAN to generate faces from prompts.
MIT License
127 stars 28 forks source link

How to use --ref_img_path argument? #7

Open GungraveJ7 opened 1 year ago

GungraveJ7 commented 1 year ago

I use the following command, python clip_generate.py --prompt "blonde hair and purple eyes and very angry"

it seems to work perfectly, but when I change the reference image path python clip_generate.py --ref_img_path .\input --prompt "blonde hair and purple eyes and very angry"

it comes out as: Traceback (most recent call last): File "clip_generate.py", line 125, in ref_img = clip_preprocess(Image.open(ref_img_path)).unsqueeze(0).to(device) File "C:\Work\PythonEnv\PytorchTool\lib\site-packages\PIL\Image.py", line 3227, in open fp = builtins.open(filename, "rb") PermissionError: [Errno 13] Permission denied: '.\input'

then I add the filename and run again python clip_generate.py --ref_img_path .\input\target.jpg --prompt "blonde hair and purple eyes and very angry"

it works but does not start from my reference photo.

Please help! sorry for my poor English.