diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

Passing `cross_attention_kwargs` to `StableDiffusionInstructPix2PixPipeline`

Open AlexeyZhuravlev opened this issue 1 year ago • 0 comments

Add cross_attention_kwargs to __call__ method of StableDiffusionInstructPix2PixPipeline, which are passed to UNet.

What does this PR do?

Implements https://github.com/huggingface/diffusers/issues/7962

Adding ability to pass custom cross-attention arguments for UNet. This allows all the same functionality with cross-attention manipulations as inside StableDiffusionPipeline: LoRAs, custom adapters, etc.

Before submitting

  • [ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • [x] Did you read the contributor guideline?
  • [x] Did you read our philosophy doc (important for complex PRs)?
  • [ ] Was this discussed/approved via a GitHub issue or the forum? Please add a link to it if that's the case.
  • [x] Did you make sure to update the documentation with your changes? Here are the documentation guidelines, and here are tips on formatting docstrings.
  • [ ] Did you write any new necessary tests?

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.

@sayakpaul @patil-suraj

AlexeyZhuravlev avatar May 16 '24 19:05 AlexeyZhuravlev