π‘ Z2J Lighting
The biggest profile in the pack β Z2J Lighting turns light setups into a seed
- text
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 oflighting_*.jsonfiles; drop a custom one intoprofiles/and restart.prefix/suffix- anchors around the lighting line.lighting_typeandlighting_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.
Inputs (7)
| 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 | lighting_default.json | Select vocabulary profile |
| prefixopt | STRING | Text to prepend to generated prompt | |
| suffixopt | STRING | Text to append to generated prompt | |
| lighting_typeopt | COMBO | any | Filter by lighting type |
| lighting_moodopt | COMBO | any | Lighting mood hint |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| text | STRING | β |