Nodes/ComfyUI-Zero2JSON/πŸ’‘ Z2J Lighting
ComfyUI Node

πŸ’‘ Z2J Lighting

The biggest profile in the pack β€” Z2J Lighting turns light setups into a seed

By MushroomFleetΒ·Created 7 months agoΒ·Updated 5 months agoΒ· 1
πŸ’‘ Z2J Lighting
    • text
    β—„seed0β–Ί
    β—„prompt_index0β–Ί
    β—„profilelighting_default.jsonβ–Ί
    β—„prefixβ–Ί
    β—„suffixβ–Ί
    β—„lighting_typeanyβ–Ί
    β—„lighting_moodanyβ–Ί

    Lighting is where generated text earns its keep. Anyone can type "cinematic lighting," and the model yawns; describe a Rembrandt setup with a warm fill and a cool rim, and the image visibly changes. Z2J Lighting is the node that manufactures those real lighting recipes for you - and its default profile is the biggest in the ComfyUI-Zero2JSON pack, roughly 700,000 combinations of source, quality, direction, color temperature and mood. It's the node this pack is best at, and the one I'd reach for first if I could only keep a couple.

    In the FLUX2-JSON workflow it feeds the lighting field of the prompt assembler. Given how strongly FLUX2's LLM-style encoder responds to structured descriptive blocks, a generated line like "softbox lighting from the side, Rembrandt, warm golden tones, intimate mood" is the difference between a flat render and one that looks lit on purpose.

    How it works

    Position-as-seed, same as every node here: (seed, prompt_index, slot) hashed with xxhash32, hash selects a template and one option per pool. The lighting_default.json profile has 4 templates over five pools - source (15), quality (12), direction (12), color_temp (9), mood (9). The direction pool is genuinely film-school vocabulary: split lighting, Rembrandt, butterfly, loop, broad, short. That's the part people under-prompt most and the part this node nails.

    The inputs that matter

    • seed - world seed.
    • prompt_index - position coordinate; farm this to walk light setups.
    • profile - dropdown of lighting_*.json files; drop a custom one into profiles/ and restart.
    • prefix / suffix - anchors around the lighting line.
    • lighting_type and lighting_mood - filter dropdowns (natural/studio/dramatic… and bright/dark/moody…). Fine print: in v1.0.0 as shipped, both are declared in the UI but ignored by the generator. They don't filter yet. Check for a newer release before relying on them.

    Output is a single text string.

    Install

    One repo holds all seventeen nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/MushroomFleet/ComfyUI-Zero2JSON
    cd ComfyUI-Zero2JSON
    pip install -r requirements.txt
    

    Restart ComfyUI. The requirements file is one line - xxhash>=3.0.0. No models, no API keys. Manager users: search "ComfyUI-Zero2JSON".

    Where people get burned

    Don't let the generated lighting contradict the scene's stated light source. "Moonlight" from the lighting node against "bright sunny day" from the scene node is a recipe for a muddy compromise - pick one dominant light and let the other nodes defer to it. The other real-world trap is over-specifying: five lighting descriptors can start fighting each other. Let this node own the light, keep mood as a light touch, and your renders will read as lit instead of lit-up. And yes - an unconnected text output shows nothing, so wire it to the FLUX2 field or a text display first.

    CategoryZero2JSON/Lighting

    Inputs (7)

    NameTypeDefaultDescription
    seedINT00–4294967295World seed for deterministic generation
    prompt_indexINT00–4294967295Position in infinite prompt space
    profileoptCOMBOlighting_default.jsonSelect vocabulary profile
    prefixoptSTRINGText to prepend to generated prompt
    suffixoptSTRINGText to append to generated prompt
    lighting_typeoptCOMBOanyFilter by lighting type
    lighting_moodoptCOMBOanyLighting mood hint

    Outputs (1)

    NameTypeDescription
    textSTRINGβ€”