Nodes/danbot-comfy-node/Danbot Load Model
ComfyUI Node

Danbot Load Model

Load a real tag-translation model, not an API call

By p1atdev·Created 2 years ago·Updated about a year ago· 35
Danbot Load Model
    • danbot_model
    model_name

    Danbot Load Model is the front door to the whole danbot-comfy-node pack. It pulls down the actual transformer that converts your plain-language sentence - Japanese or English - into comma-separated Danbooru tags. Everything else in the pack either feeds this model or chews on its output.

    The name is a lie in the best way: there's no API, no key, no cloud round-trip. The model runs on your own GPU through HuggingFace Transformers, the same way a LoRA-less checkpoint loads. That's the rarest thing in the "text2tag" space - most of what people suggest for this job is an LLM node pointed at Ollama or an API. This is genuinely local, which also means it's free per-run and won't vanish when a provider changes pricing.

    What it does

    One input, one output. The input is model_name, a dropdown that currently lists a single option: DanbotNL 2408 260M. The output is danbot_model, the DANBOT_MODEL handle you wire into the Generator, the V2408 Pipeline, the Formatter, and both Extractors. That handle isn't a string - it's a live wrapper around the loaded model plus its prompt templates, so those downstream nodes know exactly how to talk to it.

    Under the hood the node reads config/models.yml, which maps the friendly name to the HuggingFace repo dartags/DanbotNL-2408-260M. It loads in bfloat16, with flash-attention 2 if you have it installed and a CUDA GPU, and SDPA otherwise. trust_remote_code=True is on, because the model ships custom encoder-decoder code, not a stock architecture.

    The one thing that surprises people

    The first time you load it, nothing happens for a while - the ~262M parameter model and its tokenizer are downloading from HuggingFace. That's a ~half-gigabyte pull in bf16, so the node "hangs" for a minute or two on a fresh install. It's not broken. If you're offline or HuggingFace is blocked, this is where the pack dies; the model has to come from somewhere, and dartags/DanbotNL-2408-260M is that somewhere.

    One honest caveat: 260M params is a small language model by 2026 standards. It's tuned for exactly one job - emitting Danbooru tags - and it does that well, but don't expect encyclopedic knowledge of obscure characters. The knowledge cutoff is August 2024, so anything tagged after that is a coin flip.

    How to install

    The pack installs like any custom node. Through ComfyUI Manager, search for danbot-comfy-node, or clone it manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/p1atdev/danbot-comfy-node
    cd danbot-comfy-node
    pip install -r requirements.txt
    

    On the portable Windows build, use the bundled Python: ../../../python_embeded/python.exe -s -m pip install -r requirements.txt. The requirements are just transformers, sentencepiece, and protobuf - no exotic deps, which is a relief. Restart ComfyUI, drop a Danbot Load Model node in, and let the first run do the download.

    Categoryprompt/Danbooru Tags Translator

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBO1 options: DanbotNL 2408 260M

    Outputs (1)

    NameTypeDescription
    danbot_modelDANBOT_MODELDanbot model