Nodes/cgem156-ComfyUI๐ŸŒ/Dart Generate ๐ŸŒ
ComfyUI Node

Dart Generate ๐ŸŒ

Turn a handful of tags into a full Danbooru-style prompt

By laksjdjfยทCreated 2 years agoยทUpdated about a month agoยท 93
Dart Generate ๐ŸŒ
  • tokenizer
  • model
  • config
  • BATCH_STRING
  • STRING
โ—„promptโ–บ
โ—„batch_size1โ–บ
โ—„seed0โ–บ
โ—„negativeโ–บ
โ—„ban_tagsโ–บ

This is where Dart actually earns its keep. You feed it a sparse seed - a character name, maybe a rating, a couple of tags you care about - and it runs the loaded language model to predict a fuller tag list around them, the same way a text LLM completes a sentence. It's the sibling idea to KBlueLeaf's DanTagGen, just from a different author (p1atdev), and both exist because hand-writing 20+ well-chosen Danbooru tags every single generation gets old fast.

The mechanism, briefly

Dart was trained on real Danbooru tag co-occurrence data, so it's learned which tags actually show up together - which clothing goes with which pose, which quality tags cluster with which content. DartGenerate runs it as a proper language model: tokenize your seed prompt, sample forward token by token (or tag by tag) according to whatever DartConfig you hand it, and stop once it's produced a coherent tag sequence. Unlike a diffusion sampler, there's no image involved yet - this is purely text in, text out, and the output is meant to be dropped straight into your CLIP Text Encode node afterward.

Inputs and outputs

Required:

  • tokenizer / model - the DART_TOKENIZER and DART_MODEL from Load Dart.
  • prompt - your seed string, e.g. 1girl, hatsune_miku, blue hair.
  • batch_size - how many independent tag-list variations to generate at once, up to 4096.
  • seed - for reproducibility, same idea as any diffusion seed.

Optional:

  • config - a DartConfig node; skip it and Dart falls back to its own defaults.
  • negative - a string of tags you want the model to steer away from during generation.
  • ban_tags - tags that should never appear in the output at all, a harder constraint than negative.

Two outputs: BATCH_STRING (all generated variants, useful if batch_size > 1 and you want to feed a batch of prompts downstream) and a single STRING (handy when you just want one result to plug straight into a text encode node).

Installing it

ComfyUI Manager: search "cgem156-ComfyUI". Manual clone:

cd ComfyUI/custom_nodes
git clone https://github.com/laksjdjf/cgem156-ComfyUI

Restart after. This node itself needs nothing extra - all the weight-downloading happens back at Load Dart, the first time you run that node.

Where this goes sideways

Because there's no image encoder in this loop, low-VRAM setups shouldn't have trouble here - Dart is a small model compared to anything doing actual diffusion. The more common snags: if negative and ban_tags overlap heavily with your prompt, you're fighting the model against itself and you'll get thin, generic output; keep the seed and the exclusions on genuinely different axes. If output reads as incoherent tag soup, that's almost always a DartConfig sampling issue (temperature/top_p too loose) rather than this node - check that first before assuming Dart itself is broken. And remember this pack's README flags that some of its nodes assume you also have pythongosssss's ComfyUI-Custom-Scripts installed for its ShowText node - if you want to actually read the generated tag string in the UI without routing it all the way to a CLIP encode first, wiring the STRING output into ShowText is the easiest way to sanity-check what Dart produced before you commit to a full render.

Categorycgem156 ๐ŸŒ/dart

Inputs (8)

NameTypeDefaultDescription
tokenizerDART_TOKENIZERโ€”
modelDART_MODELโ€”
promptSTRINGโ€”
batch_sizeINT11โ€“4096โ€”
seedINT00โ€“18446744073709550000โ€”
configoptDART_CONFIGโ€”
negativeoptSTRINGโ€”
ban_tagsoptSTRINGโ€”

Outputs (2)

NameTypeDescription
BATCH_STRINGBATCH_STRINGโ€”
STRINGSTRINGโ€”