NeuralBooru LLM
The raw LLM half of NeuralBooru — no validation, for when you want to see the tag soup first
- raw_tags
- is_fallback
NeuralBooru LLM is the first half of the NeuralBooru pack split in two. Where the all-in-one NeuralBooru node does everything - call the LLM, validate against the real Danbooru vocabulary, wrap in a template - this node stops right after the LLM answers. What you get is raw_tags: the model's tag-ish output, cleaned of reasoning noise, and not a single tag verified.
Which sounds like a downgrade until you want it. If you've ever wondered what your LLM actually proposes before the whitelist mows it down - or you want to edit the raw output by hand before validation - this is the node that shows its work.
What it actually does
It's a thin HTTP client, and the only home of the LLM-calling code in the whole pack. Give it a user_prompt, it sends it to whatever OpenAI-compatible server you point lm_studio_url at, and returns the text. Three details make it less dumb than it sounds:
- Ollama is auto-detected. The node probes
/api/version; if that responds, it drives Ollama's native/api/chatendpoint instead of the OpenAI/v1/chat/completionsshape. Point it athttp://localhost:11434and it just works. - Reasoning models are handled. With
enable_thinkingon, Qwen3-style models think before answering and it strips the<think>blocks - including an unterminated one whenmax_tokenscuts reasoning off mid-stream, so reasoning never leaks into your tags. For non-thinking models the system prompt's/no_thinksuffix is removed andenable_thinkingis sent to the API. - There's a fallback signal. If the server is unreachable and
on_erroris set touse_input_text,raw_tagsholds your original description and theis_fallbackoutput flips toTrue. The workflow still produces an image instead of dying, and anything downstream can react to the flag.
The inputs and outputs that matter
Most of the inputs mirror the combined node: user_prompt, system_prompt, model (default qwen/qwen3-1.7b), temperature (0.4 is the sweet spot), max_tokens, seed (re-roll for a fresh variation), lm_studio_url, plus optional timeout, api_key, and on_error. What's missing is everything validation-related - that all lives in the other half.
The two outputs are the whole story:
raw_tags- the LLM's comma-separated output, think-stripped. Feed this into NeuralBooruValidator'stagsinput to reproduce the full pipeline.is_fallback-Truewhen the call failed and you got your raw description back instead. Wire it to the Validator'sis_fallbackinput and validation gets skipped automatically, matching what the combined node does internally.
In fact, that's the design: wire raw_tags → tags and is_fallback → is_fallback and the pair behaves exactly like the single NeuralBooru node - because the combined node is just these two wired together under the hood.
Installation
It ships in the same pack, so installing NeuralBooru covers all three nodes - Manager search for NeuralBooru, or:
cd ComfyUI/custom_nodes
git clone https://github.com/ChrisJohnson89/ComfyUI-NeuralBooru
Restart ComfyUI; the nodes appear under the NeuralBooru category. No dependencies to install - pure stdlib - and no model to download from the pack. The model you need is a local chat model (Qwen3-1.7B is the recommendation) loaded in LM Studio, Ollama, or whatever you run.
When to reach for this one
Honestly, if you just want English-in / tags-out, use the combined NeuralBooru node. Reach for this split when you want to see or edit the raw LLM output before the filter - or when you're running the LLM on a different machine and want the validation and template steps to stay separate in your graph. Just remember the tradeoff the whole validation layer exists to fix: a small general model's output looks like Danbooru tags but isn't guaranteed to be real ones. That's what the other half is for.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| user_prompt | STRING | describe your scene here | Plain-English scene description to convert into tags. |
| system_prompt | STRING | You convert a scene description into Danbooru tags for an anime image model. Output ONLY lowercase tags separated by commas. No sentences, no explanations, no numbering, no category words. Write attributes in real Danbooru tag style: 'blue eyes' not 'eye color blue', 'black hair' not 'hair color black'. Use spaces, not underscores. Use 1girl, 1boy, 2girls, etc. for people. Do NOT add quality tags like masterpiece, best quality, absurdres, score_9 - those are added separately. Example input: a cheerful blonde girl in a red dress on a beach at sunset Example output: 1girl, blonde hair, long hair, smile, red dress, beach, sunset, ocean, sky, cloud, standing Example input: a lone samurai in the rain at night Example output: 1boy, solo, samurai, japanese clothes, katana, rain, night, wet, serious, outdoors Now output tags only for the next description. /no_think | Instructions for the LLM. Edit to change tagging behavior. |
| model | STRING | qwen/qwen3-1.7b | Model id as the server reports it (see /v1/models). |
| enable_thinking | BOOLEAN | false | Allow reasoning-mode models to think before answering. Slower; output is cleaned either way. |
| temperature | FLOAT | 0.400–2 | — |
| max_tokens | INT | 50050–2000 | — |
| seed | INT | 00–4294967295 | Change to re-roll the LLM call; also sent to the API. |
| lm_studio_url | STRING | http://localhost:1234 | Base URL of any OpenAI-compatible server: LM Studio (:1234), Ollama (:11434), llama.cpp, vLLM. |
| timeoutopt | INT | 12010–600 | Seconds to wait for the LLM response. |
| api_keyopt | STRING | Optional Bearer token for servers that require auth (vLLM, remote endpoints). Leave empty for LM Studio/Ollama. | |
| on_erroropt | COMBO | raise | raise: fail the workflow with a visible error. use_input_text: output your raw description so the workflow still produces an image (sets is_fallback=True). |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| raw_tags | STRING | The LLM's tag-ish output, think-stripped and reasoning-fallback applied. Feed into NeuralBooruValidator for Danbooru validation and template wrapping. |
| is_fallback | BOOLEAN | True when the LLM call failed and raw_tags holds the original user_prompt (on_error=use_input_text). NeuralBooruValidator skips validation in this case. |