BD Parts Vocabulary
The closed list that stops Qwen 2.1 inventing a hat
- vocabulary
- vlm_prompt
What it's for
This node loads no model and generates nothing, and it's still one of the two or three nodes that decides whether the BrainDead parts pipeline works. It's a text field with a job: it holds the closed list of items the head decomposer is allowed to extract, and it writes the matching true/false question you ask a vision model to find out which of them are actually on the head.
Why a closed list at all? Because Qwen Image 2.1 draws anything you ask for, present or not. Ask it to extract the sunglasses from a bare-faced head and you get a confident pair of sunglasses. The author's rule from the source is stated plainly: never ask for an item the vote did not find. The vocabulary is the whitelist, and the vote is the filter. There's a longer version of this argument in our KB's character consistency doc - instruction editors re-emit the whole frame, and they'll happily re-emit things you never mentioned.
How it works
The vocabulary widget is one item per line, four pipe-separated columns:
key | words the vision model is asked | noun used in edit prompts | accessory (yes/no)
Blank lines and # comments are skipped. Leave a column empty and it falls back to the key, so a lazy line like nose is legal. The fourth column accepts yes, y, true, 1 or accessory.
The default list is fourteen lines - hair, eyebrows, eyes, mouth, beard, moustache, glasses, sunglasses, hat, helmet, headband, headphones, earrings, piercings. Cheek moles, scars and tattoos aren't on it; add them:
# custom lines, one item per line
scar | scar or face scar | scar | no
beauty spot | beauty mark or mole | beauty mark | no
The accessory flag is the one that does the structural work. Accessories are what "head without items" and the bald plate remove - hair, beard and moustache, plus every flagged accessory. Everything else (eyes, brows, mouth) is treated as part of the face and stays.
The two outputs
vocabulary goes into BD Parts Builder 2's vocabulary input unchanged, so the list that was voted on is the list that gets extracted.
vlm_prompt is the generated question: look at this character's head, answer true only if the item is clearly visible, one JSON object mapping every listed item to true or false, nothing else. Wire it into AILab_QwenVL's custom_prompt (Qwen3-VL-8B-Instruct is what the shipped workflow uses), and the model's reply into the builder's presence. Our KB's llm-in-comfyui doc explains why you should expect chat preamble around that JSON - you don't have to strip it yourself, because the builder reads every JSON object in the reply and tolerates fences and stray braces. If the VLM ignores you entirely, a typed list works as a fallback: hair, eyes, hat.
Installing it
It ships with the pack, so: ComfyUI Manager → search "BrainDead" → install → restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/BizaNator/ComfyUI-BrainDead
cd ComfyUI-BrainDead && pip install -r requirements.txt
No models of its own, no VRAM. The vision model is someone else's node.
Where people get burned
Forgetting the accessory flag. This is the classic one. Add a line for scarf without yes in the fourth column and it will be extracted perfectly and then cheerfully left on your "head without items" base image, because the removal step only strips flagged accessories.
Every true vote costs money and time downstream. Each present item means a visible edit and a complete edit, both at 40 steps. A generous vocabulary that votes six items present is thirteen generative passes before the plates even start. Keep the list to the things you actually want as separate layers.
Matching is loose on purpose, and that cuts both ways. The vote parser matches keys against the key, the ask words, and whatever the ask falls back to when split on or, / and commas - which is exactly why hat or cap catches "cap". It also means a one-word ask like "cap" will match a reply key of "cap", so don't use ask-words that are substrings of other items you keep.
Two nodes, one source of truth. The builder has its own vocabulary field. If you edit the list in the builder instead of here, you've changed what's extracted but not what was voted on - and the vote's absent items get drawn anyway.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| vocabulary | STRING | hair | hair | hair | no eyebrows | eyebrows | eyebrows | no eyes | eyes | eyes | no mouth | mouth | mouth and lips | no beard | beard | beard | no moustache | moustache | moustache | no glasses | glasses | glasses | yes sunglasses | sunglasses | sunglasses | yes hat | hat or cap | hat | yes helmet | helmet | helmet | yes headband | headband or bandana | headband or bandana | yes headphones | headphones | headphones | yes earrings | earrings | earrings | yes piercings | piercings | piercings | yes | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| vocabulary | STRING | — |
| vlm_prompt | STRING | — |