OC Outfit Headwear Part
Hats, hair ornaments, and 204 ways to top a head
- oc_part
- prompt_preview
- debug_text
OCOutfit Headwear Part is the second-biggest part catalog in the pack, and it's a proper grab bag: 204 options spanning three subgroups - hats (帽子), head ornaments (头饰), and hair ornaments (发饰). You get baseball_cap, backwards_hat, animal_hat, animal_hood, bandana, bald (a headwear tag, apparently), adjusting_headwear, alternate_headwear, plus a deep run of hair-ornament entries like anchor_hair_ornament, bat_hair_ornament, bear_hair_ornament, and animal_on_head.
That breadth is the node's whole personality. Hats, ribbons, animal-ear headbands, and "there is a small animal sitting on this character's head" all live in one slot, so you can build a head silhouette in a single dropdown.
How it works
mode-unset(default, emits nothing),fixed, orrandomize. The pack's universal footgun: leave it unset and your character's head stays bare.option- static dropdown over all 204, formatted头饰 | 整理头饰 -> adjusting_headwear.
group has four choices (__all_groups__, 帽子, 头饰, 发饰) and the option dropdown is static - so the group/option mismatch is live here, and with 204 entries it's the easiest way to get a fallback you didn't expect. Pick baseball_cap, switch group to 发饰, and execution grabs the first hair-ornament entry instead, flagged in debug_text. Rule of thumb for the big catalogs: keep group on __all_groups__ and pick from the flat list, or pin a subgroup and expect the fallback.
randomize is deterministic (same seed, same headwear) - handy for flipping hat styles across a character sheet. color_role defaults to auto, mapping the headwear slot to accent, which is the right role for a hat or hair accessory against a primary-colored outfit.
Outputs
oc_part (typed OC_PART_OUTFIT_HEADWEAR, wire into Character Outfit Block's headwear_part), prompt_preview (the resolved tag), debug_text (mode, color role, pool index, fallback notes).
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/Zhuozhuo-219/ComfyUI-OC-Generator
Restart ComfyUI, or use ComfyUI Manager (search ComfyUI-OC-Generator). No extra dependencies, no model downloads - the catalog ships in-repo.
The honest take: 204 options makes this one of the better value nodes in the pack - big enough that most headwear needs are covered, including the silly and the specific. It's still curated, and the pack is young and quiet enough that debug_text is your real documentation. When the head comes out wrong: mode first, group/option mismatch second, model third.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| group | COMBO | __all_groups__ | Limit the part to one subgroup inside this slot. The option dropdown is still static in the UI. |
| mode | COMBO | unset | unset emits no prompt. fixed keeps the selected option. randomize samples within the current slot pool. |
| option | COMBO | 头饰 | 整理头饰 -> adjusting_headwear | Static dropdown for all options in this part node. If the selected option is outside the current group, execution falls back to the first valid item in that group. |
| color_roleopt | COMBO | auto | How this part should consume the global palette. auto lets Character Outfit Block assign a role by slot. |
| seedopt | INT | 00–4294967295 | Seed used by randomize mode for reproducible part selection. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| oc_part | OC_PART_OUTFIT_HEADWEAR | Structured local part data for Character Outfit Block. |
| prompt_preview | STRING | The prompt fragment resolved by this part node. |
| debug_text | STRING | Execution details for slot filtering and random selection. |