Skip to content

Fix: propagate interpolate_pos_encoding through Pixio model hierarchy#45469

Closed
Spectual wants to merge 1 commit intohuggingface:mainfrom
Spectual:fix/pixio-propagate-interpolate-pos-encoding
Closed

Fix: propagate interpolate_pos_encoding through Pixio model hierarchy#45469
Spectual wants to merge 1 commit intohuggingface:mainfrom
Spectual:fix/pixio-propagate-interpolate-pos-encoding

Conversation

@Spectual
Copy link
Copy Markdown

What does this PR do?

PixioPatchEmbeddings.forward already accepted an interpolate_pos_encoding flag (inherited from ViTPatchEmbeddings) to skip image-size validation and allow variable-resolution inputs. However, neither PixioEmbeddings, PixioModel, nor PixioBackbone exposed or forwarded that flag, making it impossible to use the model on images with non-default sizes.

This PR adds the interpolate_pos_encoding parameter to each of those three classes and threads it through the call chain.

Fixes #44716

Code Agent Policy

  • I confirm that this is not a pure code agent PR.

Before submitting

Who can review?

@yonigozlan @molbap

…s, PixioModel, and PixioBackbone

PixioPatchEmbeddings.forward already accepted an interpolate_pos_encoding
flag (inherited from ViTPatchEmbeddings) to skip image-size validation for
variable-resolution inputs, but neither PixioEmbeddings nor PixioModel nor
PixioBackbone exposed or passed that flag, making it impossible to use the
model on images with non-default sizes.

Fixes huggingface#44716
@github-actions
Copy link
Copy Markdown
Contributor

[For maintainers] Suggested jobs to run (before merge)

run-slow: pixio

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PixioPatchEmbeddings.forward supports interpolate_pos_encoding but it is not propagated through PixioEmbeddings/PixioModel

2 participants