A general extension to utilize TIPO or DanTagGen to do 'text-presampling' based on KGen library: a/https://github.com/KohakuBlueleaf/KGen
A general extension to utilize TIPO or DanTagGen to do "text-presampling" based on KGen library: https://github.com/KohakuBlueleaf/KGen
It can generate the detail tags/core tags about the character you put in the prompts. It can also add some extra elements into your prompt.
an extra z is added to repo name to ensure this extension will run process()
after other extensions
TIPO(Text to Image with text presampling for Prompt Optimization) 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).
More information can be found in this brief tech report: https://hackmd.io/@KBlueLeaf/BJULOQBR0
DanTagGen(Danbooru Tag Generator) is a LLM model designed for generating Danboou Tags with provided informations. It aims to provide user a more convinient way to make prompts for Text2Image model which is trained on Danbooru datasets.
More information about model arch and training data can be found in the HuggingFace Model card:
KBlueLeaf/DanTagGen-beta · Hugging Face
Install it from extension tab, after restart the webui, you will found a new nl prompt text box under positive prompt box. And a tipo accordion beside it.
Clone this repo into the custom_node folder, after restart the comfyui, you will see TIPO node is under utils/promptgen
category.
<|special|>
: 1girl, 1boy, 1other, ...<|characters|>
: character tags<|copyrights|>
: copyright tags (series name)<|artist|>
: artist tags<|general|>
: general tags<|meta|>
: highres/lowres/absurdres are all meta tags<|quality|>
: score_xxx, masterpiece, best quality...<|rating|>
: safe, sensitive, nsfw, explicit ...<|generated|>
: generated NL prompt<|extended|>
: extended NL prompt (If nl prompt is not provided, extended will be filled with generated NL caption. if both extended and generated are in the format but nl prompt is not provided, TIPO will generate 2 NL prompt.)An example workflow for ComfyUI is included in the examples
folder in this repo, if you want to try it, remember to download https://github.com/pythongosssss/ComfyUI-Custom-Scripts.git into your custom_node folder as well.