Nodes/comfyui-fvmtools/SMP · Structured Prompt Assembler (legacy)
ComfyUI Node

SMP · Structured Prompt Assembler (legacy)

One prompt dict, four regional prompts

By ping1979ping·Created 5 months ago·Updated about a month ago· 0
SMP · Structured Prompt Assembler (legacy)
  • prompt_dict
  • outfit_dict
  • location_dict
  • face_prompt
  • body_prompt
  • outfit_prompt
  • location_prompt
  • region_map
  • structured
include_qualitytrue
face_eye_boost1.10
subject_index0
subject_json{ "id": "subject_1", "age_desc": "young", "gender": "woman", "skin_tags": ["smooth skin"], "expression": "neutral expression", "hair_color_length": "dark auburn hair" }

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 - the STRUCTURED_PROMPTS bundle, 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.

CategoryFVM Tools/SMP/Output

Inputs (7)

NameTypeDefaultDescription
include_qualityBOOLEANtrue
face_eye_boostFLOAT1.101–1.4
subject_indexINT00–9
prompt_dictoptPROMPT_DICT
outfit_dictoptOUTFIT_DICT
location_dictoptLOCATION_DICT
subject_jsonoptSTRING{ "id": "subject_1", "age_desc": "young", "gender": "woman", "skin_tags": ["smooth skin"], "expression": "neutral expression", "hair_color_length": "dark auburn hair" }

Outputs (6)

NameTypeDescription
face_promptSTRING
body_promptSTRING
outfit_promptSTRING
location_promptSTRING
region_mapREGION_MAP
structuredSTRUCTURED_PROMPTS