Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add sd3 pipeline and models #96
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
Add sd3 pipeline and models #96
Changes from 1 commit
8b3494d
012af64
3b7d1e8
6b847f2
c3b6388
18241c2
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any feedback on apple/ml-stable-diffusion#329?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apple appears to still be reviewing but I'll be happy to update when that is merged - this is just for testing and review purposes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This model does not have a split einsum package; however, some Macs default to using the ANE with split einsum attention. What do you think we could do to override compute unit selection in this case, and force it to always be GPU?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the inverse approach and only enabled it for .all and .gpu https://github.com/huggingface/swift-coreml-diffusers/pull/96/files#diff-eb8807a52606483b97fb37ae59fb50afcd9e0504aa9381d40727807badf31233R111. If user selects ANE it will show a pipeline error because the zip wont be found. We could make that a little cleaner though with a descriptive error, if you'd prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better error sounds good if we can. I think it's ok to stop there unless the first-time launch for new users defaults to split einsum + sd3 on some Macs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm adding this to the selector so that folks will know when it is available or not. This way it will not fail and delete the model cache, since it will never attempt to download it in the first place.
Not supported:


Supported:
It also will auto switch back to GPU if selecting a model where the previous compute unit was ANE.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to convert the SDXL and SD3 model into Split_Einsum? I have a MBP M2 and an iPad Pro M4 both with 16GB Ram and on both the ANE is a lot faster than CPU/GPU! For now I am using the 768x768 Split_Einsum SDXL model for iOS and I am wondering why there are no Split_Einsum versions of those bigger models?