diff --git a/face_alignment/detection/core.py b/face_alignment/detection/core.py index 5d80397..2ef58f8 100644 --- a/face_alignment/detection/core.py +++ b/face_alignment/detection/core.py @@ -24,9 +24,17 @@ def __init__(self, device, verbose): logger = logging.getLogger(__name__) logger.warning("Detection running on CPU, this may be potentially slow.") - if 'cpu' not in device and 'cuda' not in device and 'mps' not in device: + if ( + "cpu" not in device + and "cuda" not in device + and "mps" not in device + and "xpu" not in device + ): if verbose: - logger.error("Expected values for device are: {cpu, cuda, mps} but got: %s", device) + logger.error( + "Expected values for device are: {cpu, cuda, mps, xpu} but got: %s", + device, + ) raise ValueError def detect_from_image(self, tensor_or_path):