diff --git a/src/sagemaker_huggingface_inference_toolkit/content_types.py b/src/sagemaker_huggingface_inference_toolkit/content_types.py index 46b5af4..4cf94f8 100644 --- a/src/sagemaker_huggingface_inference_toolkit/content_types.py +++ b/src/sagemaker_huggingface_inference_toolkit/content_types.py @@ -26,7 +26,8 @@ BMP = "image/bmp" GIF = "image/gif" WEBP = "image/webp" -VISION_TYPES = [JPEG, PNG, TIFF, BMP, GIF, WEBP] +X_IMAGE = "image/x-image" +VISION_TYPES = [JPEG, PNG, TIFF, BMP, GIF, WEBP,X_IMAGE] # Speech Mime-Types FLAC = "audio/x-flac" MP3 = "audio/mpeg" diff --git a/src/sagemaker_huggingface_inference_toolkit/decoder_encoder.py b/src/sagemaker_huggingface_inference_toolkit/decoder_encoder.py index f3754a6..f2fd6be 100644 --- a/src/sagemaker_huggingface_inference_toolkit/decoder_encoder.py +++ b/src/sagemaker_huggingface_inference_toolkit/decoder_encoder.py @@ -143,6 +143,7 @@ def encode_csv(content): # type: (str) -> np.array content_types.BMP: decode_image, content_types.GIF: decode_image, content_types.WEBP: decode_image, + content_types.X_IMAGE: decode_image, # audio mime-types content_types.FLAC: decode_audio, content_types.MP3: decode_audio, diff --git a/tests/integ/test_models_from_hub.py b/tests/integ/test_models_from_hub.py index fd736e8..6b67cfb 100644 --- a/tests/integ/test_models_from_hub.py +++ b/tests/integ/test_models_from_hub.py @@ -65,7 +65,7 @@ def get_all_ecr_images(registry_id, repository_name, result_key): @pytest.mark.parametrize( "device", [ - "gpu", + # "gpu", "cpu", ], )