YuvalNirkin / fsgan

FSGAN - Official PyTorch Implementation
https://nirkin.com/fsgan
Creative Commons Zero v1.0 Universal
749 stars 147 forks source link

How do I swap faces on pictures instead of videos #148

Closed wym-dlone closed 2 years ago

wym-dlone commented 3 years ago

The article introduces the image can be face, I would like to ask how to image face.

lxzatwowone1 commented 2 years ago

Just change the code a little, the essence of the video is the picture

YuvalNirkin commented 2 years ago

Target images are not yet supported in v2. For now you can use face_swap_images2images.py from v1.

wym-dlone commented 2 years ago

Just change the code a little, the essence of the video is the picture

Thank you very much!

wym-dlone commented 2 years ago

Target images are not yet supported in v2. For now you can use face_swap_images2images.py from v1.

Thank you very much! But I ran into a new problem. The first time I ran face_swap_images2images.py, it worked. When I run it the second time, I have this problem:“RuntimeError: CUDA out of memory. Tried to allocate 2.15 GiB (GPU 0; 10.00 GiB total capacity; 5.76 GiB already allocated; 2.12 GiB free; 5.80 GiB reserved in total by Py Torch)”, and the GPU usage is 0.Thank you very much!

nonlin commented 2 years ago

For clarity when stated to use script with V1, does that mean copy script into V2 env or switch to a V1 Env and use said script?