Nodes/comfyui-prompt-library-nodes/Unified T2I Prompt Source
ComfyUI Node

Unified T2I Prompt Source

Unified T2I Prompt Source (and the dead widgets nobody notices)

By 2223290690z-hue·Created 3 months ago·Updated 2 months ago· 1
Unified T2I Prompt Source
    • positive
    • library_path
    prefix
    role_1
    outfit_1(first outfit)
    role_2
    outfit_2(first outfit)
    picker_appearance
    picker_pose
    picker_scene
    picker_camera
    picker_prop
    picker_clothing
    additions
    manual_prompt
    selected_terms_preview
    prompt_preview
    negative_preset
    negative_terms
    seed0

    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, or none) and a character-count tag - 1girl, solo with one role, 2girls, lesbian if you set role_2. That "lesbian" is hardcoded; for a non-romantic two-person scene, put -lesbian on its own line in additions to exclude it.
    • Role blocks are joined with BREAK, and numbered as no.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.2 appended - apply a (term:1.2) weight
    • -something - remove that term from the final prompt
    • no.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.

    CategoryPrompt Manager

    Inputs (18)

    NameTypeDefaultDescription
    prefixCOMBO5 options: illustration quality, photo quality, concept art quality, quality only, none
    role_1COMBO4 options: (none), (random), Explorer, Researcher
    outfit_1COMBO(first outfit)5 options: (none), (first outfit), Explorer / Field Gear, Researcher / Lab Coat, Explorer / City Casual
    role_2COMBO4 options: (none), (random), Explorer, Researcher
    outfit_2COMBO(first outfit)5 options: (none), (first outfit), Explorer / Field Gear, Researcher / Lab Coat, Explorer / City Casual
    picker_appearanceCOMBO2 options: (add appearance), appearance: Soft Backlight
    picker_poseCOMBO2 options: (add pose), pose: Looking Over Map
    picker_sceneCOMBO2 options: (add scene), scene: Old Observatory
    picker_cameraCOMBO2 options: (add camera), camera: Medium Shot
    picker_propCOMBO2 options: (add prop), prop: Weathered Map
    picker_clothingCOMBO1 options: (add clothing)
    additionsSTRING
    manual_promptSTRING
    selected_terms_previewSTRING
    prompt_previewSTRING
    negative_presetCOMBO2 options: standard, none
    negative_termsSTRING
    seedINT00–18446744073709550000

    Outputs (2)

    NameTypeDescription
    positiveSTRING
    library_pathSTRING