Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
datasets:
|
4 |
+
- laion/conceptual-captions-12m-webdataset
|
5 |
+
- CaptionEmporium/coyo-hd-11m-llavanext
|
6 |
+
- KBlueLeaf/danbooru2023-metadata-database
|
7 |
+
- graph-based-captions/GBC10M
|
8 |
+
language:
|
9 |
+
- en
|
10 |
+
pipeline_tag: text-generation
|
11 |
+
library_name: transformers
|
12 |
+
---
|
13 |
+
# TIPO: Text to Image with text presampling for Prompt Optimization
|
14 |
+
|
15 |
+
200M LLaMA arch model trained for TIPO.
|
16 |
+
|
17 |
+
|
18 |
+
## Introduction
|
19 |
+
|
20 |
+
In this project, we introduce "TIPO" (**T**ext to **I**mage with text presampling for **P**rompt **O**ptimization), an innovative framework designed to significantly enhance the quality and usability of Text-to-Image (T2I) generative models. TIPO utilizes the Large Language Models (LLMs) to perform "Text Presampling" within the inference pipeline of text-to-image generative modeling. By refining and extending user input prompts, TIPO enables generative models to produce superior results with minimal user effort, making T2I systems more accessible and effective for a wider range of users.
|
21 |
+
|
22 |
+
## Usage
|
23 |
+
Use updated version of DTG extension (renamed to z-tipo-ext), current version of z-tipo-ext support stable-diffusion-webui, stable-diffusion-webui-forge and ComfyUI. SD-Next haven't been tested.
|
24 |
+
|
25 |
+
## Metric
|
26 |
+
We have tested TIPO in several metric:
|
27 |
+
|
28 |
+
#### 1. Aesthetic Score (Higher is Better)
|
29 |
+
|
30 |
+
We compute the Aesthetic Score using the **Aesthetic Predictor V2.5**. This metric is calculated on the short/truncated long test.
|
31 |
+
|
32 |
+
![Aesthetic Score Distribution](https://hackmd.io/_uploads/HkJphkSCA.png)
|
33 |
+
|
34 |
+
*Figure 1: Aesthetic Score distribution.*
|
35 |
+
|
36 |
+
#### 2. AI Corrupt Score (Higher is Better)
|
37 |
+
|
38 |
+
The AI Corrupt Score is obtained from the **AICorruptMetrics** in **sdeval**.
|
39 |
+
|
40 |
+
This metric is calculated on the short/truncated long test.
|
41 |
+
|
42 |
+
![AI Corrupt Score Distribution](https://hackmd.io/_uploads/SJlktvE0R.png)
|
43 |
+
|
44 |
+
*Figure 2: AI Corrupt Score distribution.*
|
45 |
+
|
46 |
+
#### 3. Frechet Dino Distance (FDD) on Scenery Tag Test
|
47 |
+
|
48 |
+
We use FDD on the Scenery Tag Test to demonstrate that when input prompts address a smaller distribution, the model struggles to generate images that reflect the true distribution. However, with **TIPO**, this issue is mitigated.
|
49 |
+
|
50 |
+
| FDD Model | `<meta> scenery` only | `<meta> scenery` + TIPO |
|
51 |
+
|------------------|-----------------------|-------------------------|
|
52 |
+
| DinoV2 ViT-S | 0.1917 | **0.1786** |
|
53 |
+
| DinoV2 ViT-B | 0.2002 | **0.1755** |
|
54 |
+
| DinoV2 ViT-L | 0.2017 | **0.1863** |
|
55 |
+
| DinoV2 ViT-G | 0.2359 | **0.2096** |
|
56 |
+
|
57 |
+
*Table 1: Frechet Dino Distance (FDD) on Scenery Tag Test.*
|
58 |
+
|
59 |
+
## LICENSE
|
60 |
+
This model is released under [Kohaku License 1.0](https://kblueleaf.net/documents/kohaku-license/?[Your%20Organization/Name]=KohakuBlueLeaf&[Year]=2024)<br>
|
61 |
+
You can check the above provided URL or check the LICENSE file in this repo.
|