Nodes/ComfyUI-Ichis-Pack/ICHIS Tag Category Select
ComfyUI Node

ICHIS Tag Category Select

Dropdowns that only exist because of some heroic JavaScript

By ichabodcole·Created about a year ago·Updated 11 months ago· 2
ICHIS Tag Category Select
  • tag_metadata
  • tag_selection
  • selected_categories
  • category_tags
categories
allow_emptyfalse
debugfalse

This node exists to do something ComfyUI doesn't give you for free: combo-box dropdowns whose options come from a file's data, live. ICHIS Tag Category Select takes the ICHIS_TAG_METADATA produced by the loader, and instead of making you type category names by hand, it shows you a "+ category" button and a dropdown per selected category - populated with the actual categories in your CSV, refreshed as you edit the file. The pack's own docs admit this was hard-won territory; there's a whole lessons file in the repo about fighting ComfyUI's widget lifecycle to make it work.

How it works

Two halves. In Python, the node receives tag_metadata and returns a structured selection payload plus plain lists. In the browser, a JavaScript extension (web/tag_category_select.js) hides the raw categories text input, injects the combo widgets, and listens for the loader's ichis-tag-loader broadcast event. When you change a dropdown, the extension syncs your picks into a hidden newline-joined string that the Python side parses - that's how the selection travels back into the graph.

The outputs are:

  • tag_selection - a structured payload (selected categories, deduped tag list, signatures, timestamp) for the sampler.
  • selected_categories - a plain LIST of category names, for anything that just wants the names.
  • category_tags - a LIST of every tag across the chosen categories, deduplicated while preserving order.

The inputs

  • tag_metadata (required) - wire this from the loader's metadata output. Without it the node has nothing to build dropdowns from.
  • categories - the hidden newline-separated string the JS writes. You normally never touch it.
  • allow_empty - lets you intentionally clear every selection. Off by default, because an empty selection usually means a mistake.
  • debug - adds the metadata categories and raw input to the payload.

Where people get burned

If the dropdowns come up empty, the cause is almost always upstream: the loader's metadata socket isn't connected to this node's tag_metadata, or the loader's file path doesn't resolve. Check the loader's resolved_path and cache_hit before you blame this node. Second classic issue: dynamically added widgets historically didn't survive a page refresh - ComfyUI's serializer only knows the initial widget set. The pack wrote elaborate restoration logic (retry timers, onConfigure hooks, recreating widgets from widgets_values) to paper over exactly that, but if you're on a ComfyUI version where combo widgets vanish after reload, that's the frontier you've hit. And don't hand-edit the hidden string; the JS owns it.

Installing it

It's part of the Ichis pack - and note this one needs its front-end files, which ship with the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/ichabodcole/ComfyUI-Ichis-Pack

Restart ComfyUI, or install ComfyUI-Ichis-Pack from ComfyUI Manager. No model downloads; the dependency list is just torch, which you already have. If you update the pack, restart ComfyUI so the JS changes load.

Where it fits

Middle of the pipeline: loader → this node → ICHIS Tag Sampler. You pick "faces" and "hair" from your catalog once, and every subsequent sampled prompt draws only from those categories - which is exactly the control you want when you're building a themed batch instead of rolling pure chaos.

CategoryICHIS

Inputs (4)

NameTypeDefaultDescription
tag_metadataICHIS_TAG_METADATA
categoriesoptSTRING
allow_emptyoptBOOLEANfalse
debugoptBOOLEANfalse

Outputs (3)

NameTypeDescription
tag_selectionICHIS_TAG_SELECTION
selected_categoriesLIST
category_tagsLIST