Skip to content

Add ConvNeXtV2 to NormalizedConfigManager - #2508

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

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

Conversation

@kratos0718

Copy link
Copy Markdown

Summary

Part of #351. ConvNeXtV2 already has an ONNX export config but was missing from NormalizedConfigManager, so ORTOptimizer can't run on it yet.

  • Added "convnextv2": NormalizedVisionConfig to _conf (alphabetically, between convnext and cvt)
  • Removed convnextv2 from the TODO: missing normalized configs comment above it
  • ConvNextV2Config exposes image_size and num_channels directly, which is exactly what NormalizedVisionConfig expects, so no custom subclass was needed

Test plan

  • Added two tests to tests/utils/test_normalized_config.py: one confirming convnextv2 resolves to NormalizedVisionConfig, and one instantiating a real ConvNextV2Config() and asserting the normalized image_size/num_channels match the underlying config
  • Ran both locally against the actual transformers.ConvNextV2Config (not mocked) — both pass

ConvNeXtV2 has an ONNX export config but was missing from NormalizedConfigManager.
Its config exposes image_size and num_channels directly, matching
NormalizedVisionConfig, so no custom subclass is needed.
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