ποΈ Prompt Categorizer
Stop Squinting at Tag Soup β Let It Sort Itself
- categorized_text
- quality
- style
- character
- hair
- clothing
- action
- pose
- scene
- lighting
- misc
Long anime prompts read like a wall of commas, and half the difficulty is figuring out what's in there. Prompt Categorizer from the comfyui-character-suite pack takes your flat, comma-separated prompt and splits it into labeled buckets - quality, style, character, hair, clothing, action, pose, scene, lighting, and a catch-all misc. It's the suite's "tell me what I actually wrote" node, and it's genuinely useful for two jobs: auditing a prompt you're about to run, and auditing a character or segment library you've been building.
It doesn't change anything about the image. It categorizes text. Set your expectations there and it's a great tool.
How it works
The default path is pure heuristics: a built-in keyword map for each category, matched by exact tag first, then substring. masterpiece β quality. silver hair β hair. rim light β lighting. Anything that matches nothing lands in misc. No network, no model, instant.
The optional path is where it gets interesting. Flip use_llm on and point llm_api_url at a local OpenAI-compatible endpoint - LM Studio's default is http://localhost:1234/v1/chat/completions, Ollama is http://localhost:11434/v1/chat/completions. Note the README says only unmatched tags get sent to the LLM, but the shipped code is simpler than that: with use_llm on, the whole prompt goes to your local model, which is asked to return JSON putting every tag in exactly one category. That's the design to keep in mind - it's all-or-nothing, so the LLM pass is only as fast as your local model, and it's reading everything. What the code does do sensibly: any failure - dead server, bad JSON, timeout - silently falls back to the heuristic buckets. You can't brick your workflow with a dead endpoint.
The inputs, all three of them:
prompt- any prompt string, multiline.use_llm- boolean, default off.llm_api_url- optional, only read whenuse_llmis on.
Outputs: categorized_text (a formatted summary, bucket headers with their tags) plus ten STRING outputs - one per category - so you can wire just the lighting tags or just the clothing tags into another node.
Installing it
cd ComfyUI/custom_nodes/
git clone https://github.com/DrkSun81/comfyui-character-suite
Restart, find it under CharacterSuite (or ComfyUI Manager β search "character suite"). No pip dependencies. Python 3.9+.
Where people get tripped up
- The heuristic buckets are blunt instruments. Substring matching means a tag like "standing" - which lives in both the action and pose keyword sets - lands wherever the first match happens to be. Don't treat the output as gospel; treat it as a strong suggestion.
miscis where everything unknown goes, and there will be a lot of it. Tags your model knows well but the keyword map doesn't (character names, series names, artist names) all pile up there. That's by design - misc is the honest "I don't know" pile.- The LLM path is only worth it if you already run a local server. My take: don't install LM Studio or Ollama just for this node. For occasional categorization, heuristics alone are fine; the LLM pass is a nice-to-have for people who already keep a local model running. And given the ecosystem's history with LLM-flavored nodes (the KB's LLM-in-ComfyUI material carries a real security warning about exactly this category), defaulting to the no-network path is the right instinct.
- It doesn't reorder your prompt. Some categorizers rebuild your prompt grouped by category; this one just reports. If you wire category outputs back into a prompt builder, you're doing the grouping yourself.
Run final_positive from Prompt Builder through this node once and you'll see your character library's blind spots instantly - every tag you've been re-typing that never made it into a saved segment. That's the real payoff.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt | STRING | masterpiece, best quality, 1girl, long silver hair, school uniform, standing, looking at viewer, classroom, soft lighting | β |
| use_llm | BOOLEAN | false | β |
| llm_api_urlopt | STRING | http://localhost:1234/v1/chat/completions | β |
Outputs (11)
| Name | Type | Description |
|---|---|---|
| categorized_text | STRING | β |
| quality | STRING | β |
| style | STRING | β |
| character | STRING | β |
| hair | STRING | β |
| clothing | STRING | β |
| action | STRING | β |
| pose | STRING | β |
| scene | STRING | β |
| lighting | STRING | β |
| misc | STRING | β |