williamyang1991 / DualStyleGAN

[CVPR 2022] Pastiche Master: Exemplar-Based High-Resolution Portrait Style Transfer
Other
1.61k stars 249 forks source link

Fantastic work, I was wondering if I can still run this in my pc which has no GPU. #92

Open PetitePupil opened 10 months ago

PetitePupil commented 10 months ago

How to run it only using CPU as my device does not have a GPU to support CUDA/NVIDIA Drivers

williamyang1991 commented 10 months ago

Please refer to https://github.com/williamyang1991/DualStyleGAN/tree/main/model/stylegan/op_cpu#readme

And modify https://github.com/williamyang1991/DualStyleGAN/blob/b3f0cf8e9e07ad002f9df07981e2eecaf0569191/style_transfer.py#L61

to

device = "cpu"
PetitePupil commented 10 months ago

Thankyou, Seems to be working.

Also, can you provide a link to the gradio version of the program?

williamyang1991 commented 10 months ago

https://huggingface.co/spaces/CVPR/DualStyleGAN/tree/main

PetitePupil commented 10 months ago

Thankyou