Skip to content

fix simple attention processor encoder hidden states dimension ordering#3014

Merged
williamberman merged 1 commit intohuggingface:mainfrom
williamberman:simple_attention_processor_fix_encoder_hidden_states_dimension_ordering
Apr 10, 2023
Merged

fix simple attention processor encoder hidden states dimension ordering#3014
williamberman merged 1 commit intohuggingface:mainfrom
williamberman:simple_attention_processor_fix_encoder_hidden_states_dimension_ordering

Conversation

@williamberman
Copy link
Copy Markdown
Contributor

@williamberman williamberman commented Apr 7, 2023

I accidentally flipped the sequence and hidden dimensions of the encoder hidden states in the text projection model for the unclip pipeline. This will standardize all attention processors to use (batch, seq len, hidden dimension).

The encoder_hidden_states.transpose(1,2) in the added kv attention processor is extraneous. I ran a script against the hub and confirmed that the karlo pipelines are the only pipelines which use the simple attention blocks, so this is a safe change to make.

I separately ran the unclip integration tests and confirmed it works 👍

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

HuggingFaceDocBuilderDev commented Apr 7, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Copy Markdown
Contributor

@patrickvonplaten patrickvonplaten left a comment

Choose a reason for hiding this comment

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

Do we need to update any slow tests here or not really?

@williamberman
Copy link
Copy Markdown
Contributor Author

Do we need to update any slow tests here or not really?

Nope ran them manually to double check

@williamberman williamberman merged commit b6cc050 into huggingface:main Apr 10, 2023
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.

3 participants