Update README.md
Browse files
README.md
CHANGED
@@ -1,3 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
## Playground-v2-1024-aesthetic in original SDXL format
|
2 |
|
3 |
version of the original (https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic) that works in webui;
|
@@ -6,4 +18,97 @@ it's a conversion for easier evaluation. I do not own or is a part of creating t
|
|
6 |
|
7 |
|
8 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
license_name: playground-v2-community
|
4 |
+
license_link: https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/LICENSE.md
|
5 |
+
tags:
|
6 |
+
- text-to-image
|
7 |
+
- playground
|
8 |
+
inference:
|
9 |
+
parameters:
|
10 |
+
guidance_scale: 3.0
|
11 |
+
---
|
12 |
+
|
13 |
## Playground-v2-1024-aesthetic in original SDXL format
|
14 |
|
15 |
version of the original (https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic) that works in webui;
|
|
|
18 |
|
19 |
|
20 |
|
21 |
+
---
|
22 |
+
|
23 |
+
(original README):
|
24 |
+
|
25 |
+
|
26 |
+
|
27 |
+
# Playground v2 – 1024px Aesthetic Model
|
28 |
+
|
29 |
+
This repository contains a model that generates highly aesthetic images of resolution 1024x1024. You can use the model with Hugging Face 🧨 Diffusers.
|
30 |
+
|
31 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/p0up5GNQgO0vVIiJ672K7.png)
|
32 |
+
|
33 |
+
|
34 |
+
**Playground v2** is a diffusion-based text-to-image generative model. The model was trained from scratch by the research team at [Playground](https://playground.com).
|
35 |
+
|
36 |
+
Images generated by Playground v2 are favored **2.5** times more than those produced by Stable Diffusion XL, according to Playground’s [user study](#user-study).
|
37 |
+
|
38 |
+
We are thrilled to release [intermediate checkpoints](#intermediate-base-models) at different training stages, including evaluation metrics, to the community. We hope this will encourage further research into foundational models for image generation.
|
39 |
+
|
40 |
+
Lastly, we introduce a new benchmark, [MJHQ-30K](#mjhq-30k-benchmark), for automatic evaluation of a model’s aesthetic quality.
|
41 |
+
|
42 |
+
### Model Description
|
43 |
+
|
44 |
+
- **Developed by:** [Playground](https://playground.com)
|
45 |
+
- **Model type:** Diffusion-based text-to-image generative model
|
46 |
+
- **License:** [Playground v2 Community License](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/LICENSE.md)
|
47 |
+
- **Summary:** This model generates images based on text prompts. It is a Latent Diffusion Model that uses two fixed, pre-trained text encoders ([OpenCLIP-ViT/G](https://github.com/mlfoundations/open_clip) and [CLIP-ViT/L](https://github.com/openai/CLIP/tree/main)). It follows the same architecture as [Stable Diffusion XL](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
48 |
+
|
49 |
+
### Using the model with 🧨 Diffusers
|
50 |
+
|
51 |
+
Install diffusers >= 0.24.0 and some dependencies:
|
52 |
+
```
|
53 |
+
pip install transformers accelerate safetensors
|
54 |
+
```
|
55 |
+
|
56 |
+
To use the model, run the following snippet.
|
57 |
+
|
58 |
+
**Note**: It is recommend to use **`guidance_scale=3.0`**.
|
59 |
+
|
60 |
+
```python
|
61 |
+
from diffusers import DiffusionPipeline
|
62 |
+
import torch
|
63 |
+
|
64 |
+
pipe = DiffusionPipeline.from_pretrained(
|
65 |
+
"playgroundai/playground-v2-1024px-aesthetic",
|
66 |
+
torch_dtype=torch.float16,
|
67 |
+
use_safetensors=True,
|
68 |
+
add_watermarker=False,
|
69 |
+
variant="fp16"
|
70 |
+
)
|
71 |
+
pipe.to("cuda")
|
72 |
+
|
73 |
+
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
|
74 |
+
image = pipe(prompt=prompt, guidance_scale=3.0).images[0]
|
75 |
+
```
|
76 |
+
|
77 |
+
### User Study
|
78 |
+
|
79 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/8VzBkSYaUU3dt509Co9sk.png)
|
80 |
+
|
81 |
+
According to user studies conducted by Playground, involving over 2,600 prompts and thousands of users, the images generated by Playground v2 are favored **2.5** times more than those produced by [Stable Diffusion XL](https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0).
|
82 |
+
|
83 |
+
We report user preference metrics on [PartiPrompts](https://github.com/google-research/parti), following standard practice, and on an internal prompt dataset curated by the Playground team. The “Internal 1K” prompt dataset is diverse and covers various categories and tasks.
|
84 |
+
|
85 |
+
During the user study, we give users instructions to evaluate image pairs based on both (1) their aesthetic preference and (2) the image-text alignment.
|
86 |
+
|
87 |
+
### MJHQ-30K Benchmark
|
88 |
+
|
89 |
+
![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/o3Bt62qFsTO9DkeX2yLua.png)
|
90 |
+
|
91 |
+
| Model | Overall FID |
|
92 |
+
| ------------------------------------- | ----- |
|
93 |
+
| SDXL-1-0-refiner | 9.55 |
|
94 |
+
| [playground-v2-1024px-aesthetic](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic) | **7.07** |
|
95 |
+
|
96 |
+
We introduce a new benchmark, [MJHQ-30K](https://huggingface.co/datasets/playgroundai/MJHQ-30K), for automatic evaluation of a model’s aesthetic quality. The benchmark computes FID on a high-quality dataset to gauge aesthetic quality.
|
97 |
+
|
98 |
+
We have curated a high-quality dataset from Midjourney, featuring 10 common categories, with each category containing 3,000 samples. Following common practice, we use aesthetic score and CLIP score to ensure high image quality and high image-text alignment. Furthermore, we take extra care to make the data diverse within each category.
|
99 |
+
|
100 |
+
For Playground v2, we report both the overall FID and per-category FID. All FID metrics are computed at resolution 1024x1024. Our benchmark results show that our model outperforms SDXL-1-0-refiner in overall FID and all category FIDs, especially in people and fashion categories. This is in line with the results of the user study, which indicates a correlation between human preference and FID score on the MJHQ-30K benchmark.
|
101 |
+
|
102 |
+
We release this benchmark to the public and encourage the community to adopt it for benchmarking their models’ aesthetic quality.
|
103 |
+
|
104 |
+
### Intermediate Base Models
|
105 |
+
|
106 |
+
| Model | FID | Clip Score |
|
107 |
+
| ---------------------------- | ------ | ---------- |
|
108 |
+
| SDXL-1-0-refiner | 13.04 | 32.62 |
|
109 |
+
| [playground-v2-256px-base](https://huggingface.co/playgroundai/playground-v2-256px-base) | 9.83 | 31.90 |
|
110 |
+
| [playground-v2-512px-base](https://huggingface.co/playgroundai/playground-v2-512px-base) | 9.55 | 32.08 |
|
111 |
+
|
112 |
+
|
113 |
+
Apart from [playground-v2-1024px-aesthetic](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic), we release intermediate checkpoints at different training stages to the community in order to foster foundation model research in pixels. Here, we report the FID score and CLIP score on the MSCOCO14 evaluation set for the reference purposes. (Note that our reported numbers may differ from the numbers reported in SDXL’s published results, as our prompt list may be different.)
|
114 |
|