Unified T2I Prompt Source
Unified T2I Prompt Source (and the dead widgets nobody notices)
- positive
- library_path
This is the original prompt-composer in comfyui-prompt-library-nodes: the node that assembles a positive prompt out of reusable JSON library entries instead of hardcoding every fragment into the graph. You pick a quality prefix, one or two roles, an outfit for each, then sprinkle in appearance, pose, scene, camera, and prop snippets - and it emits a finished, sanitized positive string plus the path of the library it was built from.
The whole point of this pack, and this node is the heart of it: prompts, character descriptions, and scenery live in a portable JSON file you can back up, remix, and keep private, while the graph stays clean and shareable.
How it works
Under the hood it's a small database. Each library entry has a folder (the pack uses Chinese folder names internally - 角色 for roles, 服装 for outfits, 外观 for appearance, 动作姿势 for pose, 环境场景 for scene, 视角镜头 for camera, 道具物件 for props), plus title, content, tags, and optional outfits. When you pick a role, the node scores every role entry (exact id > title > tag > content) and grabs the best match. Choose (random) and it picks a seeded random entry instead - same seed, same pick, which is how you reproduce a good roll.
The assembled prompt gets a few opinionated touches you should know about:
- A quality prefix from the preset (
illustration quality,photo quality,concept art quality,quality only, ornone) and a character-count tag -1girl, solowith one role,2girls, lesbianif you setrole_2. That "lesbian" is hardcoded; for a non-romantic two-person scene, put-lesbianon its own line inadditionsto exclude it. - Role blocks are joined with
BREAK,and numbered asno.1girl,/no.2girl,. That's the classic CLIP-era multi-subject tool - meaningful on 77-token tag checkpoints, mostly inert on newer LLM-encoder models. - Every term is deduplicated, and all Chinese characters are stripped from the final output. The author's own workflow was clearly Chinese-first; if your library content itself is Chinese, it won't survive the sanitizer.
Inputs and outputs that matter
The widgets you'll actually touch: prefix, role_1/role_2 and their outfit_1/outfit_2 dropdowns, the six picker_* dropdowns (each adds a snippet line into additions and resets so you can add more), additions (the editable accumulation of picked snippets, plus power syntax), manual_prompt (one-off details that don't belong in the library yet), and seed.
additions is where this node gets genuinely clever. Lines can be:
scene: Old Observatory- look up a library folder by English alias@1.2appended - apply a(term:1.2)weight-something- remove that term from the final promptno.1girl .../no.2girl ...- scope an addition to one subject
Outputs are positive (STRING → positive CLIPTextEncode) and library_path (STRING → metadata saver or a debug note).
Installing it
Zero dependencies beyond ComfyUI core. ComfyUI Manager → search "comfyui-prompt-library-nodes" → install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/2223290690z-hue/comfyui-prompt-library-nodes.git
The gotcha nobody mentions
Look at the schema and you'll see negative_preset and negative_terms widgets on this node. They do nothing. The source passes them straight through and ignores them - the node only ever outputs a positive prompt and the library path. Don't put your negatives here; use the pack's Negative Prompt Source for that. This is also exactly why the v2 of this node (see Unified T2I Prompt Source v2) dropped them entirely - and why you should probably just use v2 instead of this one unless you're maintaining an old workflow.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| prefix | COMBO | 5 options: illustration quality, photo quality, concept art quality, quality only, none | |
| role_1 | COMBO | 4 options: (none), (random), Explorer, Researcher | |
| outfit_1 | COMBO | (first outfit) | 5 options: (none), (first outfit), Explorer / Field Gear, Researcher / Lab Coat, Explorer / City Casual |
| role_2 | COMBO | 4 options: (none), (random), Explorer, Researcher | |
| outfit_2 | COMBO | (first outfit) | 5 options: (none), (first outfit), Explorer / Field Gear, Researcher / Lab Coat, Explorer / City Casual |
| picker_appearance | COMBO | 2 options: (add appearance), appearance: Soft Backlight | |
| picker_pose | COMBO | 2 options: (add pose), pose: Looking Over Map | |
| picker_scene | COMBO | 2 options: (add scene), scene: Old Observatory | |
| picker_camera | COMBO | 2 options: (add camera), camera: Medium Shot | |
| picker_prop | COMBO | 2 options: (add prop), prop: Weathered Map | |
| picker_clothing | COMBO | 1 options: (add clothing) | |
| additions | STRING | — | |
| manual_prompt | STRING | — | |
| selected_terms_preview | STRING | — | |
| prompt_preview | STRING | — | |
| negative_preset | COMBO | 2 options: standard, none | |
| negative_terms | STRING | — | |
| seed | INT | 00–18446744073709550000 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | STRING | — |
| library_path | STRING | — |