Nodes/ComfyUI-Dart/Dart Generation Config
ComfyUI Node

Dart Generation Config

Dart Generation Config (DanbooruTagsTransformerGenerationConfig) — ComfyUI node guide

By nkchocoai·Created 2 years ago·Updated about a year ago· 33
Dart Generation Config
    • DART SETTING
    max_new_tokens128
    min_new_tokens0
    temperature1.0
    top_p1.0
    top_k100
    num_beams1

    Dart Generation Config is where you tune how conservative or how random the Dart model gets when it's filling in tags. If you've ever touched sampling settings on a text LLM - temperature, top-p, top-k - this will feel immediately familiar, because that's exactly what it is: Dart is a language model under the hood, and this node exposes the same Hugging Face generate() parameters any transformer text model uses, just aimed at Danbooru tags instead of sentences.

    What it's actually controlling

    It's entirely optional - both Dart Generate and Dart Generate(Advanced) have their own built-in defaults and will run fine without one of these plugged in. Wire one in only when you want to deliberately push the generation toward more variety or more consistency than the defaults give you.

    max_new_tokens (default 128, range 1–256) is your ceiling on how much the model is allowed to add - think of it as a length cap on the general-tag portion of the output, similar to how length on the Compose Prompt nodes works but expressed in raw token budget rather than a short/long label. min_new_tokens (default 0, range 0–255) is the floor, forcing the model to keep generating even if it would otherwise want to stop early.

    temperature (default 1, range 0–1) is the randomness dial: lower values push the model toward its single most likely next tag every time, which gets you tighter, more predictable - and more repetitive across different seeds - output; higher values (toward 1) let lower-probability tags through more often, which means more variety but also a higher chance of an odd or off-theme tag sneaking in. top_p and top_k (defaults 1 and 100) are the two standard ways of trimming the pool of candidate tags the model samples from at each step - top_p by cumulative probability, top_k by a fixed count of the most-likely candidates - and both work alongside temperature rather than replacing it.

    num_beams (default 1, range 1–10) switches on beam search when set above 1: instead of sampling one path through the tag sequence, the model explores several candidate sequences in parallel and returns the best-scoring one. That trades speed and variety for something closer to the model's globally "best" guess. Worth knowing before you crank it up: beam search and the sampling knobs above it are doing somewhat different jobs, so pairing a high num_beams with a high temperature mostly just costs you generation time without buying much - if you want beam search's more deliberate output, it pairs more naturally with a lower temperature.

    The single output, DART SETTING, wires into the optional setting input on Dart Generate or Dart Generate(Advanced).

    Installing it

    Install via ComfyUI Manager (search "ComfyUI-Dart") or clone by hand: cd ComfyUI/custom_nodes && git clone https://github.com/nkchocoai/ComfyUI-Dart.git, then restart ComfyUI. This node is bundled with the rest of the pack - no separate install, and no model download; it just packages six numbers into the DART SETTING type.

    Where this actually bites

    The realistic failure mode isn't an error, it's disappointment: crank temperature up expecting wilder, more creative tag combinations and instead get a generation that's just slightly worse - a stray tag that doesn't fit the scene, or a rating tag that reads odd next to the rest. That's the normal cost of turning up randomness on any language model, Dart included; it's not a bug, just the trade you're making. If you want variety without the risk, sweeping the seed on Dart Generate with temperature left near its default is usually the more reliable way to get different-but-still-coherent results than pushing temperature to its ceiling.

    CategoryDart

    Inputs (6)

    NameTypeDefaultDescription
    max_new_tokensINT1281–256
    min_new_tokensINT00–255
    temperatureFLOAT1.00–1
    top_pFLOAT1.00–1
    top_kINT1001–500
    num_beamsINT11–10

    Outputs (1)

    NameTypeDescription
    DART SETTINGDART SETTING