SMP · Subject Builder (legacy)
Build a person once, chain them into a crowd
- prompt_dict_in
- subject_dict
- prompt_dict
The Subject Builder is where a character starts in the SMP pipeline. It packs the who - age, gender, expression, hair, pose - into a Subject record and appends it to a PROMPT_DICT's subjects list. The append part is the feature: chain two of these and you've got a two-person scene without copy-pasting a character description into both prompts.
It's a builder node in the legacy SMP suite, so it doesn't generate anything by itself. It just makes structure. What you get out of it is a PROMPT_DICT that downstream nodes - the Aggregator, the Structured Prompt Assembler - can actually route, which is the whole reason to use SMP instead of one big hand-typed prompt.
How it works
The node builds a subject dict from its widgets - subject_id, age_desc, gender, expression, hair_color_length, pose_hint - then merges in extra_json for anything the fixed fields don't cover (skin tags, eye description, body build, whatever you want). If you connect a subject_dict instead, that dict wins outright and the widgets become decoration. The new subject is appended via a list-merge, so feeding builder one's output into builder two's prompt_dict_in grows subjects[0], subjects[1], and so on.
The extra_json is where the detail lives. The default gives you skin_tags plus expression; the SMP reference workflow shows the habit worth stealing - put eye_desc, brow_desc, lip_desc, and body_build there so your character doesn't come out as a featureless mannequin.
The inputs that matter
gender,age_desc,expression,hair_color_length- the character's headline traits.pose_hint- free-text pose, goes straight into the assembled prompt.extra_json- the fine detail, as JSON.prompt_dict_in(optional) - the chain input; feed the previous builder's output here.
Outputs
prompt_dict- the growing dict. Wire it into the next builder, or into SMP · Aggregator.
Install
No extra dependencies. Base pack install only:
cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools
Restart ComfyUI.
Common issues
Malformed extra_json is silently ignored - a stray comma and your skin tags just don't appear, with no error to chase. And the classic wiring mistake: if your second builder overwrites the first person instead of adding a second, you've connected them in parallel. Chain the first builder's prompt_dict output into the second builder's prompt_dict_in input - that's the append path.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| subject_id | STRING | subject_1 | — |
| age_desc | STRING | young | — |
| gender | STRING | woman | — |
| expression | STRING | neutral expression | — |
| hair_color_length | STRING | — | |
| pose_hint | STRING | — | |
| extra_json | STRING | { "skin_tags": ["smooth skin"], "expression": "neutral expression" } | — |
| prompt_dict_inopt | PROMPT_DICT | — | |
| subject_dictopt | SUBJECT_DICT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| prompt_dict | PROMPT_DICT | — |