[Community Pipeline] Add multilingual stable diffusion to community pipelines #1142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the new PR for multilingual stable diffusion pipeline. In the last one the git commit history was borked, so I started this new one clean. @patrickvonplaten please let me know if this one is ok! Thank you very much :)
============================================================================
As part of #841 I thought it would be nice to have a pipeline with multilingual support and @patrickvonplaten said it was a good idea! :)
I had already opened a PR but since I made some mistake in git, it was a mess, so I decided to close the PR and start this new one.
Sorry for that and for the many commits, I did that way to have a nice story of the progress, but please let me know if this is wrong.
The code is very similar to the core stable_diffusion pipeline, the only difference is that here I am adding some code to detect the language of the prompt, and (if necessary) translate that to English and then continue the pipeline.
I also changed the "Positive / negative prompts" as explained in #1002.
Here is an example of how would it work:
This example produces the following image:
I could keep working on this PR (for instance, adding the information to the docs) if this is something you would like to have. I'd also love to create a Space with this Pipeline.