π Z2J Camera Distance
How far is the camera? Z2J Camera Distance makes shot size a seed
- text
Shot size is the most underrated decision in prompting. "Close-up" versus "wide shot" changes the entire emotional contract of an image, and yet most people let the model default it. Z2J Camera Distance is the ComfyUI-Zero2JSON node that makes shot size an explicit, reproducible input - it generates the "how far / how framed" line for you, deterministically. Small profile, big effect.
It's the distance member of the camera family, feeding the shot-framing field of the FLUX2-CameraRig in the FLUX2-JSON workflow. It composes a shot type (close-up, medium, wideβ¦), a framing choice, and a level of detail into one phrase. Pair it with Z2J Camera Angle for "how" the camera looks, and this node answers "from how far."
How it works
Position-as-seed core, same as the whole pack: (seed, prompt_index, slot) hashed with xxhash32, hash picks a template and one word per pool. The camera_distance_default.json profile ships 4 templates over three pools - shot_type (9), framing (9), detail (9) - around 2,900 combinations. The smallest profile in the pack by design: framing doesn't need a million variants, it needs the right nine, found and repeated on demand.
The inputs that matter
seed- world seed.prompt_index- position coordinate; the dial for walking framing options.profile- dropdown ofcamera_distance_*.jsonfiles; custom ones appear after restart.prefix/suffix- anchors around the framing phrase.
No filter dropdown on this node - base inputs plus profile. Output is a single text string, wired into the FLUX2 camera rig or any text input.
Install
Same single repo as all seventeen nodes:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/ComfyUI-Zero2JSON
cd ComfyUI-Zero2JSON
pip install -r requirements.txt
Restart after. Only dependency: xxhash>=3.0.0, no models, no keys. ComfyUI Manager: search "ComfyUI-Zero2JSON".
Where people get burned
Distance is the natural enemy of description detail. A generated "extreme wide shot" will fight a subject description that's full of facial micro-detail - the model can't show you the glint in someone's eye from a hundred meters. If you're farming close-ups, lock the shot size tight and accept that fine body detail drops out; if you need the detail, keep the camera near. And because this node is deterministic, the same shot-size trap repeats identically until you change the seed or prompt_index - which is exactly how you're meant to break out of it.
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 | camera_distance_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 | β |