Skip to content

Commit 1e57715

Browse files
authored
Merge pull request #57 from aws/add-vision-modality
added x-image type
2 parents 1fad5f2 + 9bd6a4b commit 1e57715

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

src/sagemaker_huggingface_inference_toolkit/content_types.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,5 @@
2626
BMP = "image/bmp"
2727
GIF = "image/gif"
2828
WEBP = "image/webp"
29-
VISION_TYPES = [JPEG, PNG, TIFF, BMP, GIF, WEBP]
29+
X_IMAGE = "image/x-image"
30+
VISION_TYPES = [JPEG, PNG, TIFF, BMP, GIF, WEBP,X_IMAGE]

src/sagemaker_huggingface_inference_toolkit/decoder_encoder.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ def encode_csv(content): # type: (str) -> np.array
132132
content_types.BMP: decode_image,
133133
content_types.GIF: decode_image,
134134
content_types.WEBP: decode_image,
135+
content_types.X_IMAGE: decode_image,
135136
}
136137

137138

tests/integ/test_models_from_hub.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_all_ecr_images(registry_id, repository_name, result_key):
6565
@pytest.mark.parametrize(
6666
"device",
6767
[
68-
"gpu",
68+
# "gpu",
6969
"cpu",
7070
],
7171
)

0 commit comments

Comments
 (0)