diff --git a/src/transformers/models/idefics3/image_processing_idefics3.py b/src/transformers/models/idefics3/image_processing_idefics3.py index 80571c1b13444f..fa037b45296420 100644 --- a/src/transformers/models/idefics3/image_processing_idefics3.py +++ b/src/transformers/models/idefics3/image_processing_idefics3.py @@ -885,10 +885,7 @@ def preprocess( ] if do_rescale: - rescaled_images_array = [] - for image in images_list: - rescaled_images_array.append([rescale(img, rescale_factor, data_format=data_format) for img in image]) - images_list = rescaled_images_array + images_list = [[self.rescale(img, rescale_factor, data_format=data_format) for image in images] for images in images_list] if do_normalize: images_list = [