Unverified Commit 508c0bfe authored by Vinh H. Pham's avatar Vinh H. Pham Committed by GitHub
Browse files

Patch CLIP image preprocessor (#30698)



* patch clip preprocessor

* Update image_processing_clip.py

* Update src/transformers/models/clip/image_processing_clip.py
Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>

---------
Co-authored-by: default avataramyeroberts <22614925+amyeroberts@users.noreply.github.com>
parent 5b7a225f
......@@ -141,7 +141,7 @@ class CLIPImageProcessor(BaseImageProcessor):
]
# for backwards compatibility of KOSMOS-2
if "use_square_size" in kwargs:
if "use_square_size" in kwargs and kwargs["use_square_size"]:
self.size = {"height": size["shortest_edge"], "width": size["shortest_edge"]}
# Let's remove `use_square_size` (as it is removed from #27690), so the future Kosmos-2 image processors
# won't have this attr. being saved. (otherwise, it will enter this if branch while there is no more
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment