Skip to content

Add FluxPAGPipeline with support for PAG #11510

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

tongyu0924
Copy link
Contributor

What does this PR do?

This PR adds support for Perturbed Attention Guidance (PAG) to the FluxPipeline

Fixes #11488

Before submitting

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@DN6
Copy link
Collaborator

DN6 commented May 22, 2025

@tongyu0924 Is this ready for review? If so, could you move the pipeline under src/diffusers/pipelines/pag please and make the changes needed to import the pipeline?

@tongyu0924
Copy link
Contributor Author

@tongyu0924 Is this ready for review? If so, could you move the pipeline under src/diffusers/pipelines/pag please and make the changes needed to import the pipeline?

Done! The pipeline is now under src/diffusers/pipelines/pag. It's ready for review

@DN6
Copy link
Collaborator

DN6 commented May 26, 2025

Thank you @tongyu0924 👍🏽! Could we add the pipeline to the necessary init files

PAG Module:
https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pag/__init__.py

Pipelines Module:

_import_structure["pag"].extend(

Diffusers main init

"AnimateDiffPAGPipeline",

And then could you please add a fast test for the pipeline, similar to how it has been done here

class StableDiffusion3PAGPipelineFastTests(unittest.TestCase, PipelineTesterMixin):

@tongyu0924
Copy link
Contributor Author

Thank you @tongyu0924 👍🏽! Could we add the pipeline to the necessary init files

PAG Module: https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/pag/__init__.py

Pipelines Module:

_import_structure["pag"].extend(

Diffusers main init

"AnimateDiffPAGPipeline",

And then could you please add a fast test for the pipeline, similar to how it has been done here

class StableDiffusion3PAGPipelineFastTests(unittest.TestCase, PipelineTesterMixin):

I've added the pipeline to the necessary __init__.py files and added a fast test following the structure in test_pag_sd3.py.

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.

Sincerely Request The Support for Flux PAG Pipeline
3 participants