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.
Usage
Use updated version of DTG extension (renamed to z-tipo-extension), current version of z-tipo-extension support stable-diffusion-webui, stable-diffusion-webui-forge and ComfyUI. SD-Next haven't been tested.
https://github.com/KohakuBlueleaf/z-tipo-extension
Model arch and Training
This model is LLaMA arch with 200M parameters, the training data is combined version of Danbooru2023, GBC10M and Coyo-HD-11M.
The total token seen is around 40B tokens.
For more information please refer to the tech report and following table.
*: We only count "non-padding token" in the token seen, since all the training data have very large length range
`: Since the training data is pretty short, it cost more time to reach same token seen than general LLM pretraining.
As reference, with 4096 as max ctx length and almost all the data have reach that length, you may only need 2days to reach 10B token seen on RTX 3090 x 4 with 200M model.
Evaluation
We have tested TIPO in several metric:
1. Aesthetic Score (Higher is Better)
We compute the Aesthetic Score using the
Aesthetic Predictor V2.5
. This metric is calculated on the short/truncated long test.
Figure 1: Aesthetic Score distribution.
2. AI Corrupt Score (Higher is Better)
The AI Corrupt Score is obtained from the
AICorruptMetrics
in
sdeval
.
This metric is calculated on the short/truncated long test.
Figure 2: AI Corrupt Score distribution.
3. Frechet Dino Distance (FDD) on Scenery Tag Test
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.
FDD Model
<meta> scenery
only
<meta> scenery
+ TIPO
DinoV2 ViT-S
0.1917
0.1786
DinoV2 ViT-B
0.2002
0.1755
DinoV2 ViT-L
0.2017
0.1863
DinoV2 ViT-G
0.2359
0.2096
Table 1: Frechet Dino Distance (FDD) on Scenery Tag Test.
LICENSE
This model is released under
Kohaku License 1.0
You can check the above provided URL or check the LICENSE file in this repo.
Citation
@misc{yeh2024tipo,
title = {TIPO: Text to Image with text presampling for Prompt Optimization},
author = {Yeh, Shih-Ying},
year = {2024},
month = {9},
day = {29},
note = {Technical report available at \url{https://hackmd.io/@KBlueLeaf/BJULOQBR0}.
Model available at \url{https://huggingface.co/KBlueLeaf/TIPO-500M}.
Source code available at \url{https://github.com/KohakuBlueleaf/KGen}},
}
Runs of KBlueLeaf TIPO-200M on huggingface.co
1.6K
Total runs
0
24-hour runs
48
3-day runs
57
7-day runs
-1.7K
30-day runs
More Information About TIPO-200M huggingface.co Model
TIPO-200M huggingface.co is an AI model on huggingface.co that provides TIPO-200M's model effect (), which can be used instantly with this KBlueLeaf TIPO-200M model. huggingface.co supports a free trial of the TIPO-200M model, and also provides paid use of the TIPO-200M. Support call TIPO-200M model through api, including Node.js, Python, http.
TIPO-200M huggingface.co is an online trial and call api platform, which integrates TIPO-200M's modeling effects, including api services, and provides a free online trial of TIPO-200M, you can try TIPO-200M online for free by clicking the link below.
KBlueLeaf TIPO-200M online free url in huggingface.co:
TIPO-200M is an open source model from GitHub that offers a free installation service, and any user can find TIPO-200M on GitHub to install. At the same time, huggingface.co provides the effect of TIPO-200M install, users can directly use TIPO-200M installed effect in huggingface.co for debugging and trial. It also supports api for free installation.