ComfyUI_DanTagGen

ComfyUI_DanTagGen
★ 81

提示词生成Danbooru标签细节标签ComfyUI节点
ComfyUI_DanTagGen 节点用DanTagGen模型从提示词生成角色细节与核心Danbooru标签,并可补充额外元素,快速构建高质量提示词。
💡 把角色描述转换为详尽的Danbooru风格标签以优化提示词。
🍴 9 Forks💻 Python🔄 2024-08-01
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/9671236b7e59
📦 requirements.txt
torch
transformers
llama-cpp-python
requests
sentencepiece
image
image
📄 README

ComfyUI_DanTagGen

ComfyUI node of Kohaku’s DanTagGen Demo. 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.

What is DanTagGen

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

How to use it

Load the example workflow and connect the output to CLIP Text Encode (Prompt)‘s text input. You can right click CLIP Text Encode (Prompt) to convert in-node text input to external text input.

Options

  • tag length:
  • very short: around 10 tags
  • short: around 20 tags
  • long: around 40 tags
  • very long: around 60 tags
  • *short or long is recommended*
  • Ban tags: The black list of tags you don’t want to see in final prompt. Regex supported.
  • Temperature: Higher = more dynamic result, Lower = better coherence between tags.
  • Faster inference

    If you think the transformers implementation is slow and want to get better speed. You can install llama-cpp-python by yourself and then download the gguf model from HuggingFace and them put them into the models folder.

    (Automatic installation/download script for llama-cpp-python and gguf model are WIP)

    More information about llama-cpp-python:

  • abetlen/llama-cpp-python: Python bindings for llama.cpp (github.com)
  • jllllll/llama-cpp-python-cuBLAS-wheels: Wheels for llama-cpp-python compiled with cuBLAS support (github.com)
  • Web UI Alternative

    The official A1111/Forge extension for DTG can be found here: https://github.com/KohakuBlueleaf/a1111-sd-webui-dtg.