π Z2J Subject Position
Where the subject stands β the quiet node that actually steers composition
- text
Positioning words do more composition work per character than almost anything else you can type. "To the left, in the foreground" changes an image structurally, while a fancier adjective mostly changes texture. Z2J Subject Position is the node that manufactures those words for you, deterministically - one of the quieter members of the ComfyUI-Zero2JSON pack, and arguably one of the most useful once you're farming variants.
It's part of the subject half of the pack: it generates a spatial-placement phrase meant to feed the position field of a FLUX2_SubjectCreator in the FLUX2-JSON workflow. You get a sentence that combines a horizontal, a vertical and a depth coordinate, so a single run can tell the model "left of frame, slightly elevated, in the background" instead of making you type it.
How it works
Same machinery as every node in the pack - position-as-seed procedural text. (seed, prompt_index, slot) is hashed with xxhash32, and the hash picks a template plus one option from each pool. The subject_position_default.json profile ships:
- 4 templates that slot placeholders into natural phrasing
horizontal(15 options),vertical(12),depth(11)
That's about 7,900 unique combinations - small next to the ~31M of the subject-description profile, but for positioning you don't need a million variants; you need the right handful, and you need to be able to find them again. That's exactly what determinism buys you.
The inputs that matter
seed- the world seed.prompt_index- the position coordinate. Bump this to walk the space of placements.profile- dropdown ofsubject_position_*.jsonfiles. Drop a custom JSON intoprofiles/and it appears after restart.prefix/suffix- small anchors you glue around the generated phrase, e.g. a suffix like ", framed in a window" if you want a recurring motif.
There's no filter dropdown here - just the base four inputs plus the profile. Output is a single text string, which you feed into the FLUX2-JSON position field or any text input you like.
Install
Same as every node in the pack - it's one repo with 17 nodes in it.
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/ComfyUI-Zero2JSON
cd ComfyUI-Zero2JSON
pip install -r requirements.txt
Restart after. The only dependency is xxhash>=3.0.0; there are no model files and no API keys. ComfyUI Manager users can search "ComfyUI-Zero2JSON" instead.
Where people get burned
Because this node has no visible effect on its own (no image, just a string), the classic confusion is wiring it nowhere and then wondering what happened. Connect text to a Show Text node to see it, or straight into the FLUX2-JSON field if you're building that workflow. And keep in mind that position words only work if the rest of the prompt doesn't fight them - if your scene description is already saying "wide establishing shot," a "close-up foreground" position phrase is going to lose. That's a prompting problem, not a node problem.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| seed | INT | 00β4294967295 | World seed for deterministic generation |
| prompt_index | INT | 00β4294967295 | Position in infinite prompt space |
| profileopt | COMBO | subject_position_default.json | Select vocabulary profile |
| prefixopt | STRING | Text to prepend to generated prompt | |
| suffixopt | STRING | Text to append to generated prompt |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |