Skip to content

Add SigLIP to NormalizedConfigManager - #2516

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

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

Conversation

@kratos0718

Copy link
Copy Markdown

Summary

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

  • Added "siglip": Pix2StructNormalizedTextConfig to _conf (alphabetically, between segformer and speech_to_text)
  • Removed siglip from the TODO: missing normalized configs comment

Same dual text/vision encoder shape as GroupViT (#2513), OwlViT (#2514) and OwlV2 (#2515), all also open — carries the same NormalizedTextAndVisionConfig.__getattr__ fix, for the same reason. See #2513 for the full explanation. That's the whole batch of models with this composite shape now covered.

Test plan

  • Added test_siglip_normalizes_expected_attributes, instantiating a real SiglipConfig() and asserting hidden_size/num_attention_heads/num_layers/image_size/num_channels resolve correctly
  • Carried the same Pix2Struct regression test
  • Ran the full test file locally (python -m unittest) — all 3 tests pass

…ionConfig fix

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

Carries the same NormalizedTextAndVisionConfig.__getattr__ fix as huggingface#2513,
huggingface#2514 and huggingface#2515 for the same reason: SigLIP's text_config only has
num_hidden_layers, not a num_layers alias.
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