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

add a "Community Scripts" section #7358

Merged
merged 12 commits into from
Mar 21, 2024
Merged

add a "Community Scripts" section #7358

merged 12 commits into from
Mar 21, 2024

Conversation

yiyixuxu
Copy link
Collaborator

@yiyixuxu yiyixuxu commented Mar 16, 2024

Currently, our community folder only consists of community pipelines. However, there are tons of tips and tricks you can use with diffusers without having to make a pipeline for them.

I'm adding a "Community Scripts" section to the community folder README so we can start collecting these scripts:) We will follow the same general principle as how we currently maintain community pipelines:

  1. we encourage everyone to contribute such scripts as long as they think it might be beneficial to others in the community
  2. the community will maintain the scripts
  3. the scripts do not have to follow Diffusers design philosophy or coding styles - as long as the code examples work, we will merge them as quickly as we can so the community can start using them

Moving forward, we will also be starting to select some of the tricks and tips from this section and polish them into tutorials in our docs; but this should be the first place where we collect such scripts

@yiyixuxu
Copy link
Collaborator Author

cc @stevhliu @sayakpaul
let me know if this is a good place to host these - feel free to make suggestions or just open a new PR if you have better ideas.

I'm not super good at this but I really just want to start to collect them:)

@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.

@yiyixuxu yiyixuxu requested review from stevhliu and sayakpaul March 16, 2024 20:26
Comment on lines 3757 to 3763
## Example usages

### IP Adapter Negative Noise

Diffusers pipelines are fully integrated with IP-Adapter, which allows you to prompt the diffusion model with an image. However, it does not support negative image prompts the same way it supports negative text prompts: it does not accept a `negative_ip_adapter_adapter` argument; when you pass an `ip_adapter_image,` it will create a zero-filled tensor as a negative image. This script shows you how to create a negative noise from `ip_adapter_image` and use it to significantly improve the generation quality while preserving the composition of images.

[cubiq](https://github.com/cubiq) initially developed this feature in his [repository](https://github.com/cubiq/ComfyUI_IPAdapter_plus). The community script was contributed by [asomoza](https://github.com/Somoza). You can find more details about this experimentation [this discussion](https://github.com/huggingface/diffusers/discussions/7167)
Copy link
Member

Choose a reason for hiding this comment

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

How about providing a teaser along with results. Let's maybe not include code because the scripts themselves will provide them.

Also, WDYT about having a separate README_community_scripts.md to keep the current README a little less cluttered and easy to follow?

Copy link
Member

Choose a reason for hiding this comment

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

➕ 1 for having a separate README.md for the community scripts!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@sayakpaul
addressed the separate README part!

But I left the codes there for now because I did not make a separate .py file for each - I feel like these are just tips and tricks that would be used with some other things so it might be easier in md format so user can just copy-paste it

it's not ideal because they are a bit long so feel free to help improve it with a PR if you have good ideas!

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Great idea! I think as we start to collect more of these crowdsourced tips/tricks, it'll be easier to plan some better docs around them 😄

Comment on lines 3757 to 3763
## Example usages

### IP Adapter Negative Noise

Diffusers pipelines are fully integrated with IP-Adapter, which allows you to prompt the diffusion model with an image. However, it does not support negative image prompts the same way it supports negative text prompts: it does not accept a `negative_ip_adapter_adapter` argument; when you pass an `ip_adapter_image,` it will create a zero-filled tensor as a negative image. This script shows you how to create a negative noise from `ip_adapter_image` and use it to significantly improve the generation quality while preserving the composition of images.

[cubiq](https://github.com/cubiq) initially developed this feature in his [repository](https://github.com/cubiq/ComfyUI_IPAdapter_plus). The community script was contributed by [asomoza](https://github.com/Somoza). You can find more details about this experimentation [this discussion](https://github.com/huggingface/diffusers/discussions/7167)
Copy link
Member

Choose a reason for hiding this comment

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

➕ 1 for having a separate README.md for the community scripts!

Copy link
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

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

Thanks! 🤗

examples/community/README_community_scripts.md Outdated Show resolved Hide resolved
examples/community/README_community_scripts.md Outdated Show resolved Hide resolved
examples/community/README_community_scripts.md Outdated Show resolved Hide resolved
yiyixuxu and others added 3 commits March 21, 2024 06:22
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
@yiyixuxu yiyixuxu merged commit e4356d6 into main Mar 21, 2024
3 checks passed
@yiyixuxu yiyixuxu deleted the commiunity-scrippt branch March 21, 2024 20:05
AbhinavGopal pushed a commit to AbhinavGopal/diffusers that referenced this pull request Mar 27, 2024
* add

* add tiling

* fix

* fix

* fix

* give community script its own readme

* Update examples/community/README_community_scripts.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Update examples/community/README_community_scripts.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Update examples/community/README_community_scripts.md

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* Update examples/community/README_community_scripts.md

---------

Co-authored-by: Alexis Rolland <alexis.rolland@ubisoft.com>
Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
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