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

Upgrade coremltools, transformers; remove attn workaround #241

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

pcuenca
Copy link
Contributor

@pcuenca pcuenca commented Aug 23, 2023

Transformers 4.30.0 replaced the _build_causal_attention_mask method with a function (thus harder to patch) that could not be converted to Core ML because of apple/coremltools#1915. The PR was released as part of coremltools 7.0b2, and therefore we can:

  • Upgrade coremltools.
  • Unpin transformers, which had been frozen to 4.29.2. We now require 4.30.0 or better.
  • Remove the custom _build_causal_attention_mask in the conversion code.

Thank you for your interest in contributing to Core ML Stable Diffusion! Please review CONTRIBUTING.md first. If you would like to proceed with making a pull request, please indicate your agreement to the terms outlined in CONTRIBUTING.md by checking the box below. If not, please go ahead and fork this repo and make your updates.

We appreciate your interest in the project!

Do not erase the below when submitting your pull request:
#########

  • I agree to the terms outlined in CONTRIBUTING.md

Copy link
Collaborator

@atiorh atiorh left a comment

Choose a reason for hiding this comment

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

Thanks @pcuenca!

@atiorh atiorh merged commit df1c41c into apple:main Aug 24, 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.

2 participants