Auto Tag Node
Autocomplete, pills, and Random All
- STRING
You're on a tag-based model - Illustrious, Pony, NoobAI, Anima - and you know the drill: comma-separated booru tags are the native language, but typing them into a plain multiline box is a slog. You retype soft lighting, detailed face, masterpiece by hand every session and you're never quite sure the phrasing matches last week's workflow. Auto Tag Node is the fix: it swaps the boring text widget for a proper tag editor. Pills you can click, drag, and delete, autocomplete that knows your vocabulary, and one-click randomization for when you just want to riff.
What it actually is
One node, two halves. The Python side is nearly trivial - it joins whatever tags you've assembled into a comma-separated string and hands it out. All the interesting work is the frontend extension that replaces the text widget with a pill UI, plus two tiny API routes the pack adds to ComfyUI's backend (/autotag/files and /autotag/tags). Those routes read .txt files from the pack's tags/ folder - four shipped categories (style.txt, physical.txt, settings.txt, composition.txt), roughly a hundred tags each, formatted as one tag, weight per line. Higher weights float to the top of the autocomplete list. That's the whole backend: no models, no pip installs, no API key. It's a UI utility dressed as a node, and it doesn't need anything heavier than the built-in server and folder_paths modules already sitting in ComfyUI.
Inputs and outputs that matter
text- your working tag list, stored as a comma-separated string but displayed as pills. This is the widget you'll actually live in.max_tags- integer, 1–100, default 10. Caps how many tags Random All and Add Random pull in one go.selected_files- hidden in the UI; the Files ▾ menu controls which of your tag files feed autocomplete and randomization.input_text(optional) - a STRING input for merging tags from elsewhere in the graph. Incoming tags are deduped against what you already have and synced back into the UI.
The single STRING output is a plain comma-separated prompt, so it plugs straight into a CLIP Text Encode node - positive or negative.
The controls you'll actually use
- Random All replaces your whole list; Add Random appends unique tags. Both respect
max_tagsand your file selection. - Double-click a pill to edit it inline (autocomplete stays active while you type), drag pills to reorder, hit the
×to remove, and press Backspace with an empty input to pop the last tag. - Enter or a comma commits whatever you're typing into a pill.
Two honest caveats from reading the source. First, the weights only sort the autocomplete - randomization is uniform across the library, so Random All can happily hand you cyberpunk next to baroque, and it won't respect that masterpiece is your top-quality tag. Second, the shipped tag files are generic: broad style, character, and scene vocabulary. On Pony or Anima, where real Danbooru tags genuinely beat invented ones, you'll want to drop in your own curated files. That's the point of the pack, really - it's a container for your weighted tag library, and autocomplete treats spaces and underscores as interchangeable so you can find tags however you remember them.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/QuigleyDown/ComfyUI_AutoTag.git
Restart ComfyUI. You can also just search "Auto Tag Node" in ComfyUI Manager's install tab. No models to download, no dependency hell - the pack is pure JavaScript plus the Python node. Add your own tag files as new .txt files inside custom_nodes/ComfyUI_AutoTag/tags/; one gotcha, though: the shipped files are tracked in the repo, so if you edit them and later git pull an update you can clobber your edits. Put custom vocabulary in your own files, not theirs.
Common issues
If the node shows a plain text box instead of pills, the JS extension didn't load - restart ComfyUI and hard-refresh the browser (Ctrl+Shift+R). An empty autocomplete usually means you've unchecked every file in the Files ▾ menu or the tags/ folder got emptied by an update. And remember the editor is frontend-only: tags you want to reuse across projects live in your .txt files, not in the node - copy the pack's folder wholesale if you're rebuilding a workflow on a fresh install.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| max_tags | INT | 101–100 | — |
| selected_files | STRING | — | |
| input_textopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |