Skip to content

Conversation

@HyoungwonCho
Copy link
Contributor

@HyoungwonCho HyoungwonCho commented Apr 17, 2024

What does this PR do?

Perturbed-Attention Guidance

This implementation is based on Diffusers. StableDiffusionPAGPipeline is a modification of StableDiffusionPipeline to support Perturbed-Attention Guidance (PAG). For more information about PAG, please refer to Project / arXiv / GitHub

Hi! We have updated some of the implementations of the Perturbed-Attention Guidance, which we previously contributed to community pipelines.

Fixes # (issue)

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.

sample.py Outdated
@@ -0,0 +1,90 @@
import os
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you mean to commit this file too?

Copy link
Contributor Author

@HyoungwonCho HyoungwonCho May 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I excluded the sample.py file.

This pull request is a request that I sent by modifying some of the PAG codes that I previously contributed. I would appreciate it if you could reflect it.

Copy link
Collaborator

@yiyixuxu yiyixuxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@yiyixuxu
Copy link
Collaborator

yiyixuxu commented May 1, 2024

can we run make quality?
will merge once the tests pass

@yiyixuxu
Copy link
Collaborator

yiyixuxu commented May 1, 2024

cc @asomoza here

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@asomoza
Copy link
Member

asomoza commented May 1, 2024

Thanks for your work, this looks great, I didn't have the chance to be for the first PR so I'm just trying this one out.

I really need to sit down and test the effects of PAG because I find them really interesting, for example some of the blocks I often use for LoRAs:

normal scale 5.0, "m0" scale=5.0, "d4", "d5", "m0" scale=7.0, "d4", "d5", "m0"
20240501160255_2177944627 20240501160317_2177944627 20240501160343_2177944627 20240501160706_2177944627

Still I think it would be better to use SDXL to showcase it, this one is supposed to be a "steam powered mechanic spider robot" but at least PAG makes it more of a "spider".

@HyoungwonCho
Copy link
Contributor Author

@yiyixuxu Thank you, I removed the white space in the code for code quality check.

@HyoungwonCho
Copy link
Contributor Author

HyoungwonCho commented May 2, 2024

@asomoza Thank you for your interest in our work!

Thanks to multimodalart, users can try PAG on SDXL on Hugging Face Spaces.

For more information, please visit our github page.

@HyoungwonCho
Copy link
Contributor Author

I am struggling with build error. If this is resolved, I will open a new pull request.

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.

5 participants