From 7158f7488fc2e25c827be1b4caeab58994015876 Mon Sep 17 00:00:00 2001 From: Matt Date: Tue, 3 Dec 2024 17:52:06 +0000 Subject: [PATCH] make fixup --- src/transformers/models/pixtral/processing_pixtral.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/transformers/models/pixtral/processing_pixtral.py b/src/transformers/models/pixtral/processing_pixtral.py index e104c9858..b114b5698 100644 --- a/src/transformers/models/pixtral/processing_pixtral.py +++ b/src/transformers/models/pixtral/processing_pixtral.py @@ -22,7 +22,7 @@ from ...feature_extraction_utils import BatchFeature from ...image_utils import ImageInput, is_valid_image, load_image from ...processing_utils import ProcessingKwargs, ProcessorMixin, Unpack, _validate_images_text_input_order from ...tokenization_utils_base import PreTokenizedInput, TextInput -from ...utils import is_torch_device, is_torch_dtype, is_torch_tensor, logging, requires_backends +from ...utils import is_torch_device, is_torch_dtype, logging, requires_backends logger = logging.get_logger(__name__) @@ -66,6 +66,7 @@ class BatchMixFeature(BatchFeature): Returns: [`BatchFeature`]: The same instance after modification. """ + def _recursive_to(obj, device, *args, **kwargs): # Lists can be nested, so keep digging until we hit tensors if isinstance(obj, list):