e4s2022 / e4s

(CVPR 2023) E4S: Fine-grained Face Swapping via Regional GAN Inversion
https://e4s2022.github.io
MIT License
361 stars 32 forks source link

Can we run face swap with CPU and without GPU? #7

Open arnold408 opened 1 year ago

arnold408 commented 1 year ago

Hello, I got this error : when I tried face swap.

Traceback (most recent call last): File "/usr/lib64/python3.9/runpy.py", line 188, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib64/python3.9/runpy.py", line 111, in _get_module_details import(pkg_name) File "/root/e4s/scripts/face_swap.py", line 17, in from src.pretrained.face_parsing.face_parsing_demo import init_faceParsing_p retrained_model, faceParsing_demo, vis_parsing_maps File "/root/e4s/src/pretrained/face_parsing/face_parsing_demo.py", line 13, in from src.pretrained.face_parsing.model import BiSeNet, seg_mean, seg_std File "/root/e4s/src/pretrained/face_parsing/model.py", line 15, in seg_mean = torch.from_numpy(np.array([[0.485, 0.456, 0.406]])).float().cuda( ).reshape(1,3,1,1) File "/usr/local/lib64/python3.9/site-packages/torch/cuda/init.py", line 2 47, in _lazy_init torch._C._cuda_init() RuntimeError: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from http://www.nvidia.com/Download/index.a spx

Please suggest if this can be used with CPU instead of GPU. Thanks.

e4s2022 commented 1 year ago

Didn't test with full CPU env, which is not recommended

arnold408 commented 1 year ago

Please test with CPU only linux server and tell me if e4s will work or not. Thanks