Nodes/comfyui-art-venture/Deep Danbooru Caption
ComfyUI Node Runs on cloud

Deep Danbooru Caption

DeepDanbooruCaption — tag an image with Danbooru tags (the old-school interrogator)

By sipherxyz·Created 3 years ago·Updated 4 months ago· 352
Deep Danbooru Caption
  • image
  • caption
threshold0.50
sort_alphatrue
use_spacestrue
escapetrue
filter_tagsblacklist
device_mode
prefix
suffix
enabledtrue

Point it at an anime or illustration image and it spits out Danbooru-style tags - 1girl, long_hair, school_uniform, outdoors, smile - instead of a plain-English sentence. That's the key difference from BLIP: this speaks the tag language that booru-trained models (Illustrious, Pony, NoobAI, and their kin) were actually built on. If you're reverse-engineering the prompt for an anime image, tags are what you want, and this is one of the nodes that gives them to you.

Real talk on where it sits, though. DeepDanbooru is the original interrogator - it landed in Automatic1111 back in 2022 and it's been around forever. It works, and it's convenient that it ships inside Art Venture, but the community has largely moved to the WD14 / WD-Tagger family (SmilingWolf's models), which are trained on newer data and generally tag more accurately. If you have the choice and accuracy matters, WD14 is the modern pick. Reach for DeepDanbooru when it's already in your graph and you want tags without adding another pack.

How it works

DeepDanbooru is a classifier trained on the Danbooru tag taxonomy - millions of anime images labelled with a controlled vocabulary of tags. It runs your image through the network and gets a confidence score for every tag it knows; the ones above your threshold get kept and joined into a caption string. It's the same idea behind every booru tagger: predict the tags the image would have been labelled with.

The inputs and outputs that matter

  • image - the image to tag.
  • threshold - confidence cutoff, default 0.5 (01). Lower it to catch more (noisier) tags, raise it to keep only the confident ones. 0.5 is a sensible middle; 0.35 if you want more coverage.
  • filter_tags - a multiline blocklist, default blacklist. Drop tags here (one per line) that you never want in the output - a quick way to strip rating tags, watermarking tags, or anything that pollutes your prompt.
  • sort_alpha / use_spaces / escape - formatting toggles, all default true. use_spaces turns long_hair into long hair; escape escapes parentheses so tags like character_(series) don't break prompt weighting; sort_alpha alphabetizes. Leave these on unless you have a reason not to.
  • device_mode (optional) - AUTO, Prefer GPU, CPU. AUTO is fine.
  • prefix / suffix (optional) - text bolted onto every caption, handy for a trigger word across a dataset.

Output is caption - a STRING of comma-joined tags (list-typed, so batches work). Wire it into your prompt or a caption-save node.

How to install it

Comes with the Art Venture pack. ComfyUI Manager → search comfyui-art-venture → Install → restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/sipherxyz/comfyui-art-venture

then pip install -r comfyui-art-venture/requirements.txt and restart. The DeepDanbooru model downloads on first use.

Common issues & troubleshooting

It downloads a model / needs TensorFlow. DeepDanbooru historically pulls a model on first run and, in some builds, leans on TensorFlow - which can be a heavy, finicky dependency to get installed alongside PyTorch. If the node fails to load, check the ComfyUI console for a TensorFlow import error and install what it asks for. On a managed platform where the pack is pre-installed, this is already handled.

The tags are dated or miss things. DeepDanbooru's training data is old. Newer characters, outfits, and concepts it simply won't know. This is the main reason people switch to WD14 taggers - if your tags feel stale, that's why, and it's the fix.

Too much junk in the output. Raise threshold, and put the offenders in filter_tags (one per line). Between the two you can get a clean tag list.

CategoryArtVenture/Utils

Inputs (10)

NameTypeDefaultDescription
imageIMAGE
thresholdFLOAT0.500–1
sort_alphaBOOLEANtrue
use_spacesBOOLEANtrue
escapeBOOLEANtrue
filter_tagsSTRINGblacklist
device_modeoptCOMBO3 options: AUTO, Prefer GPU, CPU
prefixoptSTRING
suffixoptSTRING
enabledoptBOOLEANtrue

Outputs (1)

NameTypeDescription
captionSTRING