-
Notifications
You must be signed in to change notification settings - Fork 6k
Add StableDiffusion3PAGImg2Img Pipeline + Fix SD3 Unconditional PAG #9932
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
Merged
Changes from 7 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
adefc1b
fix progress bar updates in SD 1.5 PAG Img2Img pipeline
painebenjamin 4bb5b73
Merge branch 'huggingface:main' into main
painebenjamin 47563bc
catch attention mask in PAG-only attention processor for SD3 pipelines
painebenjamin 63a31d5
Merge branch 'main' of github.com:painebenjamin/diffusers
painebenjamin d49eb5b
Add SD3PAGImg2Img Pipeline and tests
painebenjamin 399f6cd
add pipeline to docs and correct documentation, ruff
painebenjamin 38c2c7b
add autogenerated stub
painebenjamin 357beb1
remove typo
painebenjamin 628bbbf
accidental delete!
painebenjamin f4448b3
Merge branch 'main' into main
painebenjamin 7f1058a
Merge branch 'main' into main
painebenjamin 2a8aa20
Merge branch 'main' into main
painebenjamin de3afaf
Merge branch 'main' into main
painebenjamin 6ed9607
Update src/diffusers/pipelines/pag/pipeline_pag_sd_3_img2img.py
painebenjamin d49cbc9
Update src/diffusers/pipelines/pag/pipeline_pag_sd_3_img2img.py
painebenjamin 66c2ab4
style changes as suggested
painebenjamin 1d192dd
Merge branch 'main' of github.com:painebenjamin/diffusers
painebenjamin 664d47b
Merge branch 'main' into main
painebenjamin 3736af3
update expected values
painebenjamin d35f725
Merge branch 'main' into main
painebenjamin 43c34aa
Merge branch 'main' into main
painebenjamin 561844b
Merge branch 'main' into main
painebenjamin 340493a
Merge branch 'main' into main
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
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.
why do we add this here? it is not used, no?
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.
That's the second part of what I wrote above - when using SD3+PAG and foregoing CFG (e.g. calling a PAG pipeline with
guidance_scale=0
,)PAGJointAttnProcessor2_0
is used instead ofPAGCFGJointAttnProcessor2_0
, and the following error is produced:An alternative to adding this particular keyword argument would be to catch all other keyword arguments with
**kwargs
, which there is precedent for in other attention processors, but I generally default to being more restrictive and not less. For whatever it's worth,PAGCFGJointAttnProcessor2_0
does both of those things; it capturesattention_mask
and does nothing with it, and also has*args
and**kwargs
.If there is any particular way that you think is the most in-line with the rest of the codebase, I'll be happy to adjust.