Nodes/ComfyUI-Zero2JSON/πŸ“ Z2J Camera Distance
ComfyUI Node

πŸ“ Z2J Camera Distance

How far is the camera? Z2J Camera Distance makes shot size a seed

By MushroomFleetΒ·Created 7 months agoΒ·Updated 5 months agoΒ· 1
πŸ“ Z2J Camera Distance
    • text
    β—„seed0β–Ί
    β—„prompt_index0β–Ί
    β—„profilecamera_distance_default.jsonβ–Ί
    β—„prefixβ–Ί
    β—„suffixβ–Ί

    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 of camera_distance_*.json files; 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.

    CategoryZero2JSON/Camera

    Inputs (5)

    NameTypeDefaultDescription
    seedINT00–4294967295World seed for deterministic generation
    prompt_indexINT00–4294967295Position in infinite prompt space
    profileoptCOMBOcamera_distance_default.jsonSelect vocabulary profile
    prefixoptSTRINGText to prepend to generated prompt
    suffixoptSTRINGText to append to generated prompt

    Outputs (1)

    NameTypeDescription
    textSTRINGβ€”