Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,8 +48,26 @@ with gr.Blocks() as demo:
|
|
| 48 |
"""
|
| 49 |
**Comparing Stable Diffusion Models**
|
| 50 |
|
| 51 |
-
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
""")
|
| 55 |
gr.LoginButton()
|
|
|
|
| 48 |
"""
|
| 49 |
**Comparing Stable Diffusion Models**
|
| 50 |
|
| 51 |
+
***Motivation***
|
| 52 |
|
| 53 |
+
Much of the motivation of this project was to compare open-source text-to-image models (I'd like to expand this beyond open-source as well).
|
| 54 |
+
I've seen bloggers recently blog about how AI generated images are stereotypical. See https://medium.com/pitfall/there-aint-no-diversity-equity-and-inclusion-when-it-comes-to-ai-0716718b313f as an example.
|
| 55 |
+
There's some assumptions that all models have these biases, so I wanted to investigate this myself so I built this comparisson tool.
|
| 56 |
+
|
| 57 |
+
In the process of building this, I thought of the use case where a developer is developing there own model -- or maybe fine-tuning an existing one -- and wants to compare the output of said model against a published one. This tool can help too!
|
| 58 |
+
|
| 59 |
+
I see this space evolving in the future to include a comprehensive list of popular text-to-image model, saving the user from going into Hugging Face and liking models to see them in this app. (Anything but providing models by free text was my goal).
|
| 60 |
+
Hopefully you gain use of this space, or Fork it and improve it. I'd love to hear people's feedback!
|
| 61 |
+
|
| 62 |
+
***How to use this app***
|
| 63 |
+
|
| 64 |
+
This app uses a [DiffusionPipeline](https://huggingface.co/docs/diffusers/main/en/api/diffusion_pipeline) to generate images.
|
| 65 |
+
|
| 66 |
+
In the dropdown you will see models that you have liked on HuggingFace. If you've liked models that aren't "text-to-image" based models, using those will fail as the app expects users to choose up to two text-to-image models.
|
| 67 |
+
You can navigate [here](https://huggingface.co/models?pipeline_tag=text-to-image&library=diffusers&sort=trending) to get models that will work with this app. Go to the model card and like it; then upon refreshing this app you will see this model in the dropdown.
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
For faster inference, you may want to duplicate the space and upgrade to GPU in settings. When I upgraded this space to T4 Medium compute, generating two images with two models took a little more than a minute.
|
| 71 |
|
| 72 |
""")
|
| 73 |
gr.LoginButton()
|