Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
KGen is a project that utilizes Large Language Models (LLMs) to generate prompts for Text-to-Image (T2I) models.
The goal is to enable T2I models to use more complicated and detailed captions during training while maintaining good usability. Which avoid the requirements of multi-level caption or caption dropout for "better flexibility".
This project contains the implementation of some prompt gen model, framework and sampling method.
The implemented framework or sampling method can also be used in other domain of field, but this project will only focus in prompt generation at this time.
Installation:
pip install tipo-kgen
Use in code: Read the Example code or TIPO-test script for more informations.
TGTS: Token Group Tree Sampling for Efficient Multi-Variants Sampling in Language Model
Implementation can be found in sampling module.
Experiment scripts can be found in scrtips
TIPO: Text to Image with text Presampling for Optimal prompting
Arxiv Paper: https://arxiv.org/abs/2411.08127
TIPO is a LLM model system designed for generating detailed prompt from input tags or caption. Unlike DTG, TIPO can handle both tags and Natural language. In theory, you can also design your own tag in linguistic way. (For example, long blue hair is acceptable tag in TIPO and will not break the model). The main difference between TIPO and DTG is:
TIPO-200M | TIPO-200M-ft | TIPO-500M | |
---|---|---|---|
Arch | LLaMA | LLaMA | LLaMA |
Max ctx length | 1024 | 1024 | 1024 |
Batch Size | 2048 | 2048 | 3584 |
Training dataset | Danbooru, GBC10M, 5epoch Danbooru, GBC10M, Coyo11M, 3epoch | Danbooru(pixtral), Coyo11M, 2epoch | Danbooru, GBC10M, Coyo11M, 5epoch |
Real Token Seen* | 40B token | 50B (10B more from TIPO-200M) | 30B token |
Training Hardware | RTX 3090 x 4 | RTX 3090 x 4 | H100 x 8 |
Training Time | 420 hour` | 120 hour` | 100 hour` |
Huggingface | KBlueLeaf/TIPO-200M · Hugging Face | KBlueLeaf/TIPO-200M-ft · Hugging Face | KBlueLeaf/TIPO-500M · Hugging Face |
*: We only count "non-padding token" in the token seen, since all the training data have very large length range.<br/>
`: 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.
A Simple DEMO for TIPO (with t2i functionality included): https://huggingface.co/spaces/KBlueLeaf/TIPO-DEMO
TIPO-extension: https://github.com/KohakuBlueleaf/z-tipo-extension
@misc{yeh2024tipotextimagetext,
title={TIPO: Text to Image with Text Presampling for Prompt Optimization},
author={Shih-Ying Yeh and Sang-Hyun Park and Giyeong Oh and Min Song and Youngjae Yu},
year={2024},
eprint={2411.08127},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2411.08127},
}
DanTagGen is an early project under KGen, trained on the Danbooru tag system. Danbooru tags often have "overlaps" or "duplicates", such as:
Although users naturally avoid these duplications, the model may benefit from having the complete set of tags for better results, as that is how they were trained.
In addition to overlapping tags, "character tags" also need to be mentioned. For simplicity, a "DreamBooth style" prompt can be used to illustrate this:
As shown above, users tend to ignore all the "descriptions" that directly point to the character. In this situation, utilizing LLMs to "connect" the "trigger word" and "related description" is a promising approach. DanTagGen is an experimental project to prove this concept.
DanTagGen uses the LLaMA architecture with 400M parameters.
DanTagGen is trained on posts with the top 75% favorite count in Danbooru, which amounts to 5 million entries.
More details about the architecture and training can be found on the Hugging Face page: KBlueLeaf/DanTagGen-beta · Hugging Face
FAQs
TIPO: Text to Image with text Presampling for Optimal prompting
We found that tipo-kgen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.