dartags / DanbotNL-2408-260M

huggingface.co
Total runs: 2.0K
24-hour runs: 0
7-day runs: 0
30-day runs: -33
Model's Last Updated: September 13 2026

Introduction of DanbotNL-2408-260M

Model Details of DanbotNL-2408-260M

DanbotNL 2408 260M

DanbotNL is translator that tranaslates from natural languages into Danbooru tags. DanbotNL supports Japanese, English and Danbooru tags .

  • Parameter size : 260M
  • Knowledge cutoff : 2024/08/31

See our tech blog (Japanese) for more details.

Model Details
Model Description
Usage
ComfyUI

See https://github.com/p1atdev/danbot-comfy-node .

Transformers
pip install transformers sentencepiece protobuf
import torch
from transformers import AutoModelForPreTraining, AutoProcessor

REPO = "dartags/DanbotNL-2408-260m"

processor = AutoProcessor.from_pretrained(
    REPO,
    trust_remote_code=True,
    revision="827103c", # optional 
)
model = AutoModelForPreTraining.from_pretrained(
    REPO,
    trust_remote_code=True,
    revision="827103c", # optional
    torch_dtype=torch.bfloat16
)

# Translate
inputs = processor(
    encoder_text="一人の猫耳の少女が座ってこっちを見ている。",
    decoder_text=processor.decoder_tokenizer.apply_chat_template(
        {
            "aspect_ratio": "tall",
            "rating": "general",
            "length": "very_short",
            "translate_mode": "exact",
        },
        tokenize=False,
    ),
    return_tensors="pt",
)

with torch.inference_mode():
    outputs = model.generate(
        **inputs.to(model.device),
        do_sample=False,
        eos_token_id=processor.decoder_tokenizer.convert_tokens_to_ids(
            "</translation>"
        ),
    )
translation = ", ".join(
    tag
    for tag in processor.batch_decode(
        outputs[0, len(inputs.input_ids[0]) :],
        skip_special_tokens=True,
    )
    if tag.strip() != ""
)
print("translation:", translation)
# translation: 1girl, solo, looking at viewer, sitting, cat girl

# Extend
inputs = processor(
    encoder_text="一人の猫耳の少女が座ってこっちを見ている。",
    decoder_text=processor.decoder_tokenizer.apply_chat_template(
        {
            "aspect_ratio": "tall",
            "rating": "general",
            "length": "long",
            "translate_mode": "approx",
            "copyright": "",
            "character": "",
            "translation": translation,
        },
        tokenize=False,
    ),
    return_tensors="pt",
)
with torch.inference_mode():
    outputs = model.generate(
        **inputs.to(model.device),
        do_sample=False,
        eos_token_id=processor.decoder_tokenizer.convert_tokens_to_ids("</extension>"),
    )
extension = ", ".join(
    tag
    for tag in processor.batch_decode(
        outputs[0, len(inputs.input_ids[0]) :],
        skip_special_tokens=True,
    )
    if tag.strip() != ""
)
print("extension:", extension)
# extension: simple background, white background, shirt, skirt, long sleeves, animal ears, closed mouth, ribbon, jacket, pantyhose, open clothes, blue eyes, brown hair, long hair, shoes, white shirt, full body, cat ears, black skirt, loafers
Prompt template
ASPECT_RATIO = Literal[
    "too_tall",
    "tall_wallpaper",
    "tall",
    "square",
    "wide",
    "wide_wallpaper",
    "too_wide",
]
RATING = Literal[
    "general",
    "sensitive",
    "questionable",
    "explicit",
]
LENGTH = Literal[
    "very_short",
    "short",
    "long",
    "very_long",
]

aspect_ratio: ASPECT_RATIO
rating: RATING
length: LENGTH

TRANSLATE_MODE = Literal[
  "exact",
  "approx",
]
translate_mode: TRANSLATE_MODE

copyright <- empty string or comma-separated valid danbooru tags (copyright)
character <- empty string or comma-separated valid danbooru tags (character)
translation <- empty string or comma-separated valid danbooru tags (general and meta)

prompt = (
  "<|bos|>"
  f"{aspect_ratio}{rating}{length}"
  "<text><|text|></text>"
  f"<|translate:{translate_mode}|><|input_end|>"
  # ↑ up to here if translate_mode == "exact"
  
  f"<copyright>{copyright}</copyright>"
  f"<character>{character}</character>"
  "<general>"
  f"<translation>{translation}</translation>"
  f"<extension>"
  # ↑ up to here if translate_mode == "approx"

  # {extension}</extension></general><|eos|> # the model generates this
)
Training dataset
License

Apache-2.0

Runs of dartags DanbotNL-2408-260M on huggingface.co

2.0K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
-33
30-day runs

More Information About DanbotNL-2408-260M huggingface.co Model

More DanbotNL-2408-260M license Visit here:

https://choosealicense.com/licenses/apache-2.0

DanbotNL-2408-260M huggingface.co

DanbotNL-2408-260M huggingface.co is an AI model on huggingface.co that provides DanbotNL-2408-260M's model effect (), which can be used instantly with this dartags DanbotNL-2408-260M model. huggingface.co supports a free trial of the DanbotNL-2408-260M model, and also provides paid use of the DanbotNL-2408-260M. Support call DanbotNL-2408-260M model through api, including Node.js, Python, http.

DanbotNL-2408-260M huggingface.co Url

https://huggingface.co/dartags/DanbotNL-2408-260M

dartags DanbotNL-2408-260M online free

DanbotNL-2408-260M huggingface.co is an online trial and call api platform, which integrates DanbotNL-2408-260M's modeling effects, including api services, and provides a free online trial of DanbotNL-2408-260M, you can try DanbotNL-2408-260M online for free by clicking the link below.

dartags DanbotNL-2408-260M online free url in huggingface.co:

https://huggingface.co/dartags/DanbotNL-2408-260M

DanbotNL-2408-260M install

DanbotNL-2408-260M is an open source model from GitHub that offers a free installation service, and any user can find DanbotNL-2408-260M on GitHub to install. At the same time, huggingface.co provides the effect of DanbotNL-2408-260M install, users can directly use DanbotNL-2408-260M installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

DanbotNL-2408-260M install url in huggingface.co:

https://huggingface.co/dartags/DanbotNL-2408-260M

Url of DanbotNL-2408-260M

DanbotNL-2408-260M huggingface.co Url

Provider of DanbotNL-2408-260M huggingface.co

dartags
ORGANIZATIONS