-
Notifications
You must be signed in to change notification settings - Fork 6.5k
IP-Adapter attention masking #6847
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
Merged
+322
−17
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
063e085
Add attention masking to attn processors
fabiorigano d753eec
Move latent image masking
fabiorigano 60336ba
Remove redundant code
fabiorigano f6451d3
Fix removed line
fabiorigano bf4eb1d
Add padding
fabiorigano 37419f1
Apply suggestions from code review
fabiorigano a180e25
Add IPAdapterMaskProcessing
fabiorigano c6fddae
Fix return types
fabiorigano 708e0eb
Update image_processor
fabiorigano bbfeb67
Add test
fabiorigano e11bb7b
Merge branch 'main' into ipadaptermasks
fabiorigano 2af0426
Apply suggestions from code review
fabiorigano 8f6247d
Fix names
fabiorigano 534b9d9
Fix style
fabiorigano cb929ff
Update src/diffusers/image_processor.py
fabiorigano 4763c82
Fix init + docstring
fabiorigano 21efcd1
Merge branch 'main' of https://github.com/huggingface/diffusers into …
fabiorigano 4115a86
Remove unnecessary parameters
fabiorigano b1b9900
Update test
fabiorigano bfe55a7
Merge branch 'main' into ipadaptermasks
sayakpaul 850c909
Merge branch 'main' into ipadaptermasks
sayakpaul 9197ca1
Merge branch 'main' into ipadaptermasks
sayakpaul ec923bd
Add test for one mask + bugfix
fabiorigano 4bc2621
Add docs
fabiorigano 3315e81
Docs: update link
fabiorigano c407388
Update tensor conversion
fabiorigano 7037644
Merge branch 'main' into ipadaptermasks
sayakpaul File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
from what I understand, it only works when we pass 1 image / 1 mask /1 ip-adapter?, if so, let's check the number of images here and throw an error if multiple image are passed
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.
Why do you think that? If you perform that check, you will remove all the instant lora functionality.
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.
it's only when
mask is not Nonethough - you can still use multiple images without maskand it's only based on the understanding that we can only use one image/one mask/one ip-adapter when we use mask, no?
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.
if it works with multiple images for sure we don't need this!
Uh oh!
There was an error while loading. Please reload this page.
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.
it works with multiple images, I tested it, so the only check should be that the number of masks matches the number of ip adapters.
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.
Are we covering these cases in the tests?