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

[UNet2DConditionModel] add cross_attention_dim as an argument #155

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

patil-suraj
Copy link
Contributor

@patil-suraj patil-suraj commented Aug 5, 2022

The cross_attention_dim is hardcoded to 1280 in cross attention blocks
This PR adds cross_attention_dim argument to UNet2DConditionModel init so that this value can be provided by the user.

Also what should be the name ? cross_attention_dim look good, but in the SpatialTransformer class it's called context_dim. Think we should refactor these names and unify them. Wdyt @patrickvonplaten @anton-l .

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 5, 2022

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

Copy link
Member

@anton-l anton-l left a comment

Choose a reason for hiding this comment

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

LGTM!
cross_attention_dim sounds good, as long as we document it afterwards to explain which shape it has an effect on

@patil-suraj patil-suraj merged commit c4a3b09 into main Aug 5, 2022
@patil-suraj patil-suraj deleted the add-cross-attn-dim-arg branch August 5, 2022 12:42
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 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