Git Product home page Git Product logo

comfyui_dantaggen's Introduction

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.

image

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.

image

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:

Web UI Alternative

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

comfyui_dantaggen's People

Contributors

huchenlei avatar

Stargazers

Udon avatar Taehoon Kim avatar  avatar machina avatar Francisco Casiano avatar  avatar  avatar Cyanocitta Yinhao Wang avatar  avatar  avatar  avatar  avatar  avatar Samwise Wang avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar ADbrasi avatar fofo avatar its me avatar yunxuan avatar Aaron Fang avatar Ahdm avatar Zhazha_JiaYiZhen avatar Shiimizu avatar Paragoner avatar shadow avatar VALADI K JAGANATHAN avatar  avatar leolee avatar chromabox avatar Antonio Vaca Cozar avatar  avatar Sandalots avatar  avatar  avatar  avatar Poutchouli avatar toso avatar toyxyz avatar Kohaku-Blueleaf avatar Lau Van Kiet avatar

Watchers

 avatar  avatar

comfyui_dantaggen's Issues

UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 1970: illegal multibyte sequence

When I installed the custom node, I got the following error

Traceback (most recent call last):
File "C:\Comfy\ComfyUI_windows_portable_2\ComfyUI\nodes.py", line 1888, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Comfy\ComfyUI_windows_portable_2\ComfyUI\custom_nodes\ComfyUI_DanTagGen_init
.py", line 1, in
from .dan_tag_gen import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
File "C:\Comfy\ComfyUI_windows_portable_2\ComfyUI\custom_nodes\ComfyUI_DanTagGen\dan_tag_gen.py", line 4, in
from .lib_dantaggen.app import get_result
File "C:\Comfy\ComfyUI_windows_portable_2\ComfyUI\custom_nodes\ComfyUI_DanTagGen\lib_dantaggen\app.py", line 11, in
import gradio as gr
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio_init_.py", line 3, in
import gradio.simple_templates
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio_simple_templates_init
.py", line 1, in
from .simpledropdown import SimpleDropdown
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio_simple_templates\simpledropdown.py", line 6, in
from gradio.components.base import FormComponent
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio\components_init_.py", line 40, in
from gradio.components.multimodal_textbox import MultimodalTextbox
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio\components\multimodal_textbox.py", line 28, in
class MultimodalTextbox(FormComponent):
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio\component_meta.py", line 198, in new
create_or_modify_pyi(component_class, name, events)
File "C:\Comfy\ComfyUI_windows_portable_2\python_embeded\Lib\site-packages\gradio\component_meta.py", line 92, in create_or_modify_pyi
source_code = source_file.read_text()
^^^^^^^^^^^^^^^^^^^^^^^
File "pathlib.py", line 1059, in read_text
UnicodeDecodeError: 'cp949' codec can't decode byte 0xe2 in position 1970: illegal multibyte sequence

Cannot import C:\Comfy\ComfyUI_windows_portable_2\ComfyUI\custom_nodes\ComfyUI_DanTagGen module for custom nodes: 'cp949' codec can't decode byte 0xe2 in position 1970: illegal multibyte sequence

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.