Nodes/ComfyUI-BatchAnimeTimm/📁 Batch AnimeTimm Tagger
ComfyUI Node

📁 Batch AnimeTimm Tagger

Caption a whole folder of anime images in one queue run

By zzczzcx1·Created about a month ago·Updated a day ago· 1
📁 Batch AnimeTimm Tagger
    • summary
    folder_path
    output_dir
    threshold0.35
    model_repoanimetimm/convnextv2_huge.dbv4-full
    include_generaltrue
    include_characterfalse
    include_artistfalse
    include_ratingtrue
    replace_underscorefalse
    use_custom_thresholdfalse
    file_extensions.png,.jpg,.jpeg,.webp,.bmp,.gif
    skip_existingfalse

    If you've ever built an anime dataset, you know the grind: load one image, tag it, save a .txt, repeat 200 times. This node kills that loop. BatchAnimeTimmTagger points at a folder, tags every image in it with the AnimeTimm model family, and writes one matching caption file per image - image.png becomes image.txt - all in a single queue operation. It's the dataset-prep convenience wrapper, not a fancy inference node, and it's very good at that one job.

    The tagger itself is worth understanding before you install. AnimeTimm is a DeepGHS project: a family of timm-based vision models trained to predict Danbooru-style tags, newer and with fresher character knowledge than the classic WD14 line. The default convnextv2_huge.dbv4-full is the strongest of them - the community's go-to when WD14 misses a character. The trade: fewer tools support it, which is exactly why this pack exists. It reuses the model loader and inference code from MakkiShizu's ComfyUI-animetimm instead of bundling a second copy. That's a deliberate design call, and it's also the number-one gotcha, so hold that thought.

    How it works

    On queue, the node scans the top level of folder_path (no subdirectories - keep your dataset flat), builds a plan mapping each image to its .txt, and instantiates one AnimeTimmNode from the companion pack. The model loads once and is reused for the whole run, so a 500-image folder isn't 500 model loads. Each image goes through the same tagger with your settings, and the caption is written with an atomic write - an interrupted save can't leave a half-written .txt. It honors ComfyUI's cancel button mid-run, which matters more than you'd think on a big folder.

    The output is a single summary STRING containing per-file results and final counts. This is an output node; you don't wire it into a render pipeline, you just queue it and read the summary.

    The inputs that matter

    • folder_path - the images. Only the top level is scanned.
    • output_dir - where captions land; leave empty to write next to the images.
    • threshold (default 0.35) - minimum confidence for a tag to survive. Lower it and you get tag spam; the default is the sensible starting point.
    • model_repo - defaults to convnextv2_huge.dbv4-full. Best accuracy, heaviest load. The small mobilenet* options are there if you're tagging thousands of images and don't need the flagship.
    • include_character (default False) - for a character dataset, flip this on; the whole point of convnextv2 is that it's good at names.
    • include_rating (default True) - includes the general/sensitive/nsfw rating tags anime-lineage models understand.
    • replace_underscore (default False) - booru tags ship as long_hair. Keep the underscores for Illustrious/NoobAI training; flip it only if your trainer or workflow wants spaces.
    • use_custom_threshold - off by default, which lets the model use its own per-tag best thresholds. Turn it on if you want one blunt cutoff for everything.
    • skip_existing (optional) - skip images that already have a .txt. Your resume button after an interrupted or partially-failed run.

    Installing

    First, install the companion - this pack will not work without it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MakkiShizu/ComfyUI-animetimm.git
    git clone https://github.com/zzczzcx1/ComfyUI-BatchAnimeTimm.git
    python -m pip install -r ComfyUI-animetimm/requirements.txt
    

    Then restart ComfyUI. ComfyUI Manager covers it too: install ComfyUI-animetimm, then batch-anime-timm from the registry. The model itself isn't downloaded at install - it pulls from HuggingFace on first use, so the first run can take a minute (or a while, for the huge convnextv2 checkpoint).

    Troubleshooting

    • "AnimeTimmNode was not found" - you skipped the companion pack. This is the #1 failure mode, and the error message says it plainly.
    • Model fails to load - check the ComfyUI console and that you can reach HuggingFace. A load failure stops the job cleanly; it won't silently write empty captions.
    • A "collision" error naming cat.jpg / cat.png - both map to cat.txt, so the node refuses rather than overwrite. Rename the offenders.
    • The run fails at the end over a corrupt image - the successfully written captions stick around, so fix the bad file and re-run with skip_existing on.

    One last thing worth saying: these are Danbooru tags, so use them for the tagged-anime lineage (Illustrious, NoobAI, that family). If you're captioning for Flux or another natural-language base, this is the wrong tool - you want a captioner, not a tagger.

    CategoryAnimeTimm

    Inputs (12)

    NameTypeDefaultDescription
    folder_pathSTRINGFolder containing images to tag (top level only)
    output_dirSTRINGWhere to save .txt files. Leave empty to use folder_path
    thresholdFLOAT0.350–1
    model_repoCOMBOanimetimm/convnextv2_huge.dbv4-full20 options: animetimm/caformer_b36.dbv4-full, animetimm/caformer_m36.dbv4-full, animetimm/caformer_s18.dbv4-full, animetimm/caformer_s36.dbv4-full, animetimm/convnextv2_huge.dbv4-full, animetimm/convnext_base.dbv4-full, +14
    include_generalBOOLEANtrue
    include_characterBOOLEANfalse
    include_artistBOOLEANfalse
    include_ratingBOOLEANtrue
    replace_underscoreBOOLEANfalse
    use_custom_thresholdBOOLEANfalse
    file_extensionsoptSTRING.png,.jpg,.jpeg,.webp,.bmp,.gifComma-separated extensions. Animated GIFs use the first frame
    skip_existingoptBOOLEANfalseSkip images whose destination .txt already exists

    Outputs (1)

    NameTypeDescription
    summarySTRING