Skip to content
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

[Core] throw error when patch inputs and layernorm are provided for Transformers2D #7200

Merged
merged 6 commits into from
Mar 8, 2024

Conversation

sayakpaul
Copy link
Member

What does this PR do?

Fixes: #7079 by throwing an error.

@sayakpaul sayakpaul requested a review from yiyixuxu March 4, 2024 03:26
@HuggingFaceDocBuilderDev

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.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we also add this PR to update the signature for norm_type to include everything we support for norm_type. we don't have signature here so maybe just add a comment like we did here

norm_type: str = "layer_norm", # 'layer_norm', 'ada_norm', 'ada_norm_zero', 'ada_norm_single', 'layer_norm_i2vgen'

we accept all of below, but I think we only had model that use patch with ada_norm_zero and ada_norm_single, no? can we double check which norm_types can be used with patch_size and throw and error accordingly (right now in the PR we assume that everything other than layer_norm is supported)

        `layer_norm', 'ada_norm', 'ada_norm_zero', 'ada_norm_single', 'layer_norm_i2vgen'

@sayakpaul sayakpaul requested a review from yiyixuxu March 5, 2024 07:40
Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@sayakpaul sayakpaul merged commit 8e19c07 into main Mar 8, 2024
17 checks passed
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.

Transformer2DModel error when using patches and norm_type=layer_norm
3 participants