1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
6.88k stars 1.33k forks source link

ValueError when adding `device='gpu'` #276

Closed ghost closed 3 years ago

ghost commented 3 years ago

I'm getting this error:

Exception has occurred: ValueError
exception: no description

at this line:

fa = face_alignment.FaceAlignment(face_alignment.LandmarksType._2D, flip_input=False, device='gpu')

when I set device='gpu'

It runs fine when I set it to cpu.

GPU: 750 ti Driver Version: 465.19.01 CUDA Version: 11.3

1adrianb commented 3 years ago

@Sentero-esp12 The values supported match the ones supported by pytorch. For cpu, device='cpu' while for gpu device='cuda'. A specific gpu can be specified like this: device='cuda:0'