SMP · Structured Prompt Assembler (legacy)
One prompt dict, four regional prompts
- prompt_dict
- outfit_dict
- location_dict
- face_prompt
- body_prompt
- outfit_prompt
- location_prompt
- region_map
- structured
This is the node that makes the SMP pipeline regional. It takes your PROMPT_DICT - the merged subject + outfit + location structure - and splits it into four tier-ordered prompt strings: face_prompt (character anchor, skin, boosted eyes, expression), body_prompt (anchor, build, pose, hands, full hair, anatomy tags), outfit_prompt (head-to-toe garment fragments), and location_prompt (background → foreground → atmosphere). Plus a REGION_MAP for logging and a STRUCTURED_PROMPTS bundle for the SAM Class Router.
Why it exists: the pack's PersonDetailer inpaints region by region, and a face pass shouldn't get the whole scene sentence - it should get the face sentence. This node carves those sentences apart, and its outputs are exactly the shape the detailer slots want. Combined with the SAM Class Router, it's the bridge between the dict pipeline and the mask-based detailing pipeline.
How it works
It delegates to core.smp.assembler.assemble_structured. You can feed it either a full prompt_dict (the normal pipeline output) or the raw parts - outfit_dict + location_dict + subject_json - and the direct dict inputs win when both are wired. The face_eye_boost slider (1.0–1.4, default 1.1) multiplies the weight of eye tags in the face prompt, which is the classic fix for faces that render with dead, generic eyes. include_quality appends quality tags; subject_index picks which subject in a multi-person dict to assemble (0–9).
The inputs that matter
prompt_dict- from SMP · Aggregator.face_eye_boost- bump it if faces come out with dead eyes.subject_index- your multi-person selector.subject_json(optional) - hand-author a subject directly when you're not using Subject Builder.
Outputs
- The four prompt strings - feed them to FaceDetailer / PersonDetailer slots.
region_map- for sidecar logging.structured- theSTRUCTURED_PROMPTSbundle, which feeds the SAM Class Router.
Install
No extra dependencies:
cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools
Restart ComfyUI.
Common issues
Eyes not boosting → check face_eye_boost is actually above 1.0. Multi-person scene producing one person's prompt → bump subject_index. And the one that surprises exactly once: if you wire both prompt_dict and the raw dicts, the raw dicts win. If your outfit/location aren't showing up in the assembled prompts, you've probably got a stale prompt_dict fighting the direct inputs.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| include_quality | BOOLEAN | true | — |
| face_eye_boost | FLOAT | 1.101–1.4 | — |
| subject_index | INT | 00–9 | — |
| prompt_dictopt | PROMPT_DICT | — | |
| outfit_dictopt | OUTFIT_DICT | — | |
| location_dictopt | LOCATION_DICT | — | |
| subject_jsonopt | STRING | { "id": "subject_1", "age_desc": "young", "gender": "woman", "skin_tags": ["smooth skin"], "expression": "neutral expression", "hair_color_length": "dark auburn hair" } | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| face_prompt | STRING | — |
| body_prompt | STRING | — |
| outfit_prompt | STRING | — |
| location_prompt | STRING | — |
| region_map | REGION_MAP | — |
| structured | STRUCTURED_PROMPTS | — |