aykamko commited on
Commit
a26b6fe
1 Parent(s): de6f795

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +89 -1
README.md CHANGED
@@ -1,3 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ```python
2
  from diffusers import DiffusionPipeline
3
  import torch
@@ -6,10 +55,49 @@ pipe = DiffusionPipeline.from_pretrained(
6
  "playgroundai/playground-v2-512px-base",
7
  torch_dtype=torch.float16,
8
  use_safetensors=True,
 
9
  variant="fp16"
10
  )
11
  pipe.to("cuda")
12
 
13
  prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
14
- image = pipe(prompt=prompt, width=512, height=512).images[0]
15
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ---
9
+ # Playground v2 – 512px Base Model
10
+
11
+ This repository contains a base (pretrain) model that generates images of resolution 512x512. It is meant primarily for research purposes. It does not tend to produce highly aesthetic images. You can use the model with Hugging Face 🧨 Diffusers.
12
+
13
+ <div>
14
+ <div style="display: flex; flex-direction: row; width: 100%;">
15
+ <img style="margin: 0; max-width: 33%; object-fit: scale-down; flex-shrink: 1;" src="https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/GBZVS0a4QcRY4eVBCExFK.jpeg" />
16
+ <img style="margin: 0; max-width: 33%; object-fit: scale-down; flex-shrink: 1;" src="https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/iqGvvAdz2TqV0G3p9zOXZ.png" />
17
+ <img style="margin: 0; max-width: 33%; object-fit: scale-down; flex-shrink: 1;" src="https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/2_BMfgFVXUoU-0ocsOz0M.png" />
18
+ </div>
19
+ <div style="display: flex; flex-direction: row; width: 100%;">
20
+ <img style="margin: 0; max-width: 33%; object-fit: scale-down; flex-shrink: 1;" src="https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/-a4tx6c9EMc88fmchW0nG.png" />
21
+ <img style="margin: 0; max-width: 33%; object-fit: scale-down; flex-shrink: 1;" src="https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/LKCjxb9NoqfRtcviaEILI.png" />
22
+ <img style="margin: 0; max-width: 33%; object-fit: scale-down; flex-shrink: 1;" src="https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/cRSItLGH42V2kz9pM6huZ.png" />
23
+ </div>
24
+ </div>
25
+
26
+ **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).
27
+
28
+ Playground v2’s images are favored 2.5 times more than those produced by Stable Diffusion XL, according to Playground’s [user study](#user-study).
29
+
30
+ We are thrilled to release all intermediate checkpoints at different training stages, including evaluation metrics, to the community. We hope this will foster more foundation model research in pixels.
31
+
32
+ Lastly, we introduce a new benchmark, [MJHQ-30K](#mjhq-30k-benchmark), for automatic evaluation of a model’s aesthetic quality.
33
+
34
+ ### Model Description
35
+
36
+ - **Developed by:** [Playground](https://playground.com)
37
+ - **Model type:** Diffusion-based text-to-image generative model
38
+ - **License:** [Playground v2 Community License](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic/blob/main/LICENSE.md)
39
+ - **Model Description:** 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).
40
+
41
+ ### Using the model with 🧨 Diffusers
42
+
43
+ Install diffusers >= 0.24.0 and some dependencies:
44
+ ```
45
+ pip install transformers accelerate safetensors
46
+ ```
47
+
48
+ To use the model, run:
49
+
50
  ```python
51
  from diffusers import DiffusionPipeline
52
  import torch
 
55
  "playgroundai/playground-v2-512px-base",
56
  torch_dtype=torch.float16,
57
  use_safetensors=True,
58
+ add_watermarker=False,
59
  variant="fp16"
60
  )
61
  pipe.to("cuda")
62
 
63
  prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
64
+ image = pipe(prompt=prompt).images[0]
65
  ```
66
+
67
+ ### User Study
68
+
69
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/8VzBkSYaUU3dt509Co9sk.png)
70
+
71
+ 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).
72
+
73
+ 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.
74
+
75
+ 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.
76
+
77
+ ### MJHQ-30K Benchmark
78
+
79
+ ![image/png](https://cdn-uploads.huggingface.co/production/uploads/63855d851769b7c4b10e1f76/o3Bt62qFsTO9DkeX2yLua.png)
80
+
81
+ | Model | Overall FID |
82
+ | ------------------------------------- | ----- |
83
+ | SDXL-1-0-refiner | 9.55 |
84
+ | [playground-v2-1024px-aesthetic](https://huggingface.co/playgroundai/playground-v2-1024px-aesthetic) | **7.07** |
85
+
86
+ We introduce a new benchmark, [MJHQ-30K](https://huggingface.co/datasets/playgroundai/MJHQ30K), for automatic evaluation of a model’s aesthetic quality. The benchmark computes FID on a high-quality dataset to gauge aesthetic quality.
87
+
88
+ We curate the high-quality dataset from Midjourney with 10 common categories, each category with 3K 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.
89
+
90
+ For Playground v2, we report both the overall FID and per-category FID. (All FID metrics are computed at resolution 1024x1024.)
91
+
92
+ We release this benchmark to the public and encourage the community to adopt it for benchmarking their models’ aesthetic quality.
93
+
94
+ ### Base Models for all resolution
95
+
96
+ | Model | FID | Clip Score |
97
+ | ---------------------------- | ------ | ---------- |
98
+ | SDXL-1-0-refiner | 13.04 | 32.62 |
99
+ | [playground-v2-256px-base](https://huggingface.co/playgroundai/playground-v2-256px-base) | 9.83 | 31.90 |
100
+ | [playground-v2-512px-base](https://huggingface.co/playgroundai/playground-v2-512px-base) | 9.55 | 32.08 |
101
+
102
+
103
+ Apart from 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.)