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

PAG is now supported in core 🤗 #8704

Closed
sayakpaul opened this issue Jun 26, 2024 · 7 comments
Closed

PAG is now supported in core 🤗 #8704

sayakpaul opened this issue Jun 26, 2024 · 7 comments
Labels
stale Issues that haven't received updates

Comments

@sayakpaul
Copy link
Member

sayakpaul commented Jun 26, 2024

Hello folks!

#7944 introduced support for Perturbed Attention Guidance (PAG) which enhances image generation quality training-free.

Generated Image without PAG Generated Image with PAG
Image without PAG Image with PAG

Check out the PAG guide here: https://huggingface.co/docs/diffusers/main/en/using-diffusers/pag.

Please treat this issue as an announcement instead. Report issues separately.

@sayakpaul sayakpaul pinned this issue Jun 26, 2024
@s9anus98a
Copy link

/usr/local/lib/python3.10/dist-packages/diffusers/pipelines/auto_pipeline.py in _get_task_class(mapping, pipeline_class_name, throw_error_if_not_exist)
183
184 if throw_error_if_not_exist:
--> 185 raise ValueError(f"AutoPipeline can't find a pipeline linked to {pipeline_class_name} for {model_name}")
186
187

ValueError: AutoPipeline can't find a pipeline linked to StableDiffusionPAGPipeline for None

@yiyixuxu
Copy link
Collaborator

@s9anus98a can you open an issue and share the code you used?

@s9anus98a
Copy link

s9anus98a commented Jun 27, 2024

@s9anus98a can you open an issue and share the code you used?

i use AutoPipelineForText2Image like in the example link provided

!pip install diffusers


self.pipeline = AutoPipelineForText2Image.from_pretrained(
            model_key,
            torch_dtype=self.dtype,
            enable_pag=True,
            pag_applied_layers=["mid"],  # You can adjust this as needed
        ).to(self.device)

@sayakpaul
Copy link
Member Author

Please create a new issue for this.

@crapthings
Copy link

@s9anus98a

pip install git+https://github.com/huggingface/diffusers

Copy link

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Sep 14, 2024
@a-r-r-o-w a-r-r-o-w removed the stale Issues that haven't received updates label Oct 15, 2024
Copy link

github-actions bot commented Nov 9, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

@github-actions github-actions bot added the stale Issues that haven't received updates label Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues that haven't received updates
Projects
None yet
Development

No branches or pull requests

5 participants