Skip to content

Commit

Permalink
Fix: siglip image processor rgb_convert is not being applied correctl…
Browse files Browse the repository at this point in the history
…y. (#34301)

Fix: do_convert_rgb
  • Loading branch information
jp1924 authored Nov 19, 2024
1 parent 0db91c3 commit 3cd78be
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/transformers/models/siglip/image_processing_siglip.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ def preprocess(
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"
Expand Down

0 comments on commit 3cd78be

Please sign in to comment.