-
Notifications
You must be signed in to change notification settings - Fork 28.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove use_square_size
after loading
#30567
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if we could remove use_square_size
at some point?
I'd like to avoid a deprecation warning since the number of CLIP users is huge (and use_square_size
is only related to KOSMOS-2).
You mean remove them from Hub repositories first, then at the end from our code? |
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Yes, although people may have already fine-tuned KOSMOS-2 (e.g. https://huggingface.co/Mit1208/kosmos-finetuned-DocLayNet), both locally and on the hub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing!
Can you add a test for kosmos to make sure that the correct image sizes are selected?
I will check what I can do (regarding the Hub repositories part) |
@amyeroberts This PR doesn't change (directly) any logic regarding the size, although it does remove a attribute and this might change something. What test you have in mind? Like
|
@ydshieh OK, if image size isn't affected then we don't need to cover that, but something like what you suggest: saving and reloading the processor to make sure it can be done. Anything which fails on main and passes with this PR :) |
Remove
use_square_size
after loading.#27690 removed
use_square_size
but keep a backward compatibility for Kosmos-2's image processor.However, once we load it with a image processor config file, we could and we should remove that no longer used attribute.
Fix #30522