Nodes/comfyui-fvmtools/SMP · Environment Builder (legacy)
ComfyUI Node

SMP · Environment Builder (legacy)

Attach the scene to your SMP prompt — with the single-scene caveat

By ping1979ping·Created 5 months ago·Updated about a month ago· 0
SMP · Environment Builder (legacy)
  • location_dict
  • prompt_dict_in
  • prompt_dict

The SMP pipeline attaches outfits to subjects and then needs somewhere to put the scene. FVM_SMP_EnvironmentBuilder is that node: it takes a LOCATION_DICT (from the SMP location generator/combiner) and attaches it to your PROMPT_DICT under the location key, where the StructuredPromptAssembler picks it up when it renders the regional prompt.

It's the scene counterpart to ClothingBuilder, and like its sibling it's part of the legacy StructPromptMaker stack - functional, stable, and superseded by the JB suite for new work. But it has one sharp edge that's worth knowing before you wire it into anything: single-scene assumption. The node stores the location at prompt_dict.location - one slot, no array. If you run two EnvironmentBuilders in a workflow, the last one wins and silently overwrites the first. There's no error, no warning, no merge. That's by design (the spec says "single-scene assumption"), and it means this node is only appropriate when the whole image shares one location.

Inputs and outputs

Required: location_dict (the LOCATION_DICT describing the scene). Optional: prompt_dict_in - the PROMPT_DICT being assembled. Leave it unconnected and the node starts fresh; connect it to build onto an existing document (e.g. one that already has a subject and outfit attached via the Subject/Clothing builders). Output: the updated prompt_dict with location set, ready for the next builder or the aggregator.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/ping1979ping/comfyui-FVMtools

No extra dependencies. Restart ComfyUI; it's under FVM Tools/SMP/Builders.

The honest note

For a new workflow, skip the SMP stack and use JB · LocationBlock - it produces a resolved location_json you can stitch into a character document directly, no typed-dict choreography required. Keep EnvironmentBuilder for maintaining existing SMP graphs, or for the one case where its design actually fits: a scene that is genuinely the same everywhere in the frame. And if your scene legitimately has multiple zones - interior plus exterior, two rooms - this node is the wrong tool, and that's not a bug you can tune away. The JB pipeline handles per-region location blocks cleanly; SMP assumes one world, period.

CategoryFVM Tools/SMP/Builders

Inputs (2)

NameTypeDefaultDescription
location_dictLOCATION_DICT
prompt_dict_inoptPROMPT_DICT

Outputs (1)

NameTypeDescription
prompt_dictPROMPT_DICT