Fix: siglip image processor rgb_convert is not being applied correctly. (#34301)

Fix: do_convert_rgb
This commit is contained in:
jp 2024-11-19 20:40:36 +09:00 committed by GitHub
parent 0db91c3c8d
commit 3cd78be34e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -198,12 +198,12 @@ class SiglipImageProcessor(BaseImageProcessor):
size=size,
resample=resample,
)
# All transformations expect numpy arrays.
images = [to_numpy_array(image) for image in images]
if do_convert_rgb:
images = [convert_to_rgb(image) for image in images]
# All transformations expect numpy arrays.
images = [to_numpy_array(image) for image in images]
if is_scaled_image(images[0]) and do_rescale:
logger.warning_once(
"It looks like you are trying to rescale already rescaled images. If the input"