Skip to content

Add OwlViT to NormalizedConfigManager - #2514

Open
kratos0718 wants to merge 1 commit into
huggingface:mainfrom
kratos0718:add-owlvit-normalized-config
Open

kratos0718 wants to merge 1 commit into
huggingface:mainfrom
kratos0718:add-owlvit-normalized-config

Conversation

@kratos0718

Copy link
Copy Markdown

Summary

Part of #351. OwlViT already has an ONNX export config but was missing from NormalizedConfigManager.

  • Added "owlvit": Pix2StructNormalizedTextConfig to _conf (alphabetically, between opt and pegasus)
  • Removed owlvit from the TODO: missing normalized configs comment

Same dual text/vision encoder shape as GroupViT (#2513, also open) — this also carries the NormalizedTextAndVisionConfig.__getattr__ fix from that PR, since OwlViT's text_config only has num_hidden_layers, not a num_layers alias, and hits the exact same bug without it. See #2513 for the full explanation. Whichever PR merges first, the other becomes a trivial rebase.

Test plan

…ionConfig fix

OwlViT has an ONNX export config but was missing from NormalizedConfigManager.
Same dual text/vision encoder shape as GroupViT/Pix2Struct, registered via
Pix2StructNormalizedTextConfig.

Carries the same NormalizedTextAndVisionConfig.__getattr__ fix as the
GroupViT PR (huggingface#2513): the class was prefixing the raw accessor name onto the
sub-config path instead of resolving it through the NUM_LAYERS-style mapping
first, which breaks .num_layers for any sub-config that only has
num_hidden_layers (true here too). Whichever of these two PRs merges first,
the other becomes a plain registration diff on rebase.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant