My Lighting
My Lighting Builds the Lighting Scene — the Prompt Is Just the Byproduct
- lighting_prompt
Here's the honest pitch: My Lighting never touches an image. It's a little point-and-click light rig that writes the lighting sentence of your prompt, so you don't have to. You drag a sun, a candle, a neon tube onto a top-down diagram of your subject, set intensity and mood, and it emits a natural-language description like "golden hour, soft golden sunlight from the front-right nearby, lit by warm candlelight out of frame from above." Plug that string into a text encoder, and the diffusion model does the actual lighting. The node just removes the worst part of writing lighting prompts: remembering the words.
And that's not a niche problem. Flat lighting with no clear direction is one of the most reliable "this is AI" tells the community keeps flagging - real photos almost always have a dominant light source, and describing the scene the way a photographer would (time of day, light position, softness) is the single highest-leverage prompt move on natural-language models like Flux. My Lighting is a GUI for that move.
How it works
The Python class is almost embarrassingly thin: one lighting_prompt string in, the same string out. All the substance lives in web/My_Lighting.js, which ComfyUI serves automatically from the web/ folder. When you create the node, the script finds the lighting_prompt widget, disables it, and adds an ⚡ Edit Lighting button. Click it and a modal opens: a circular top-down canvas with your subject at the center, front at the bottom. Pick one of eight light types - Sunlight, Window, Candlelight, Neon, Spotlight, Studio, Fire, Moonlight - and click to drop it, drag to move it, right-click to remove it.
Each light gets a small set of controls, and this is the part that matters:
- Visible - checked means the light is in frame; unchecked turns it into "lit by … out of frame".
- Intensity (Low / Med / High) and Height (Low / Mid / High → "from below" / "from above").
- Quality - Soft, Hard, Diffuse, Harsh, Warm, Cold.
- Color - a picker whose hex gets crudely translated into words ("soft red tinted"), so don't expect exact RGB fidelity.
Position on the circle maps to a direction ("front-right", "back-left") and a distance word ("very close", "nearby", "far away"). There's a Global Mood dropdown (Golden Hour, Blue Hour, Chiaroscuro, Cinematic, High/Low Key, Night, Overcast) and a live preview that updates as you fiddle. Hit ✔ Apply and the whole scene is baked into a prompt string and written back to the node.
The one input and one output
The input schema is refreshingly short: a single required lighting_prompt (STRING, multiline) and a single lighting_prompt STRING output. Don't look for more - there isn't any. The input widget is essentially a read-only display: the JS disables it, so you can't type into it. If you want to change the prompt, use the ⚡ Edit Lighting button, not the text box. The output is plain text, so wire it into a CLIPTextEncode (or the prompt input of whatever encoder your checkpoint uses) and from there into your sampler. Note it's natural-language shaped, which is where Flux and the newer LLM-encoded models live - on an SDXL booru-tag pipeline the sentence still reads fine as English, it just isn't optimized for that style.
Install
ComfyUI Manager is the easy path - search "comfyui-my-lighting" and restart. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/fabricemantion-wq/comfyui-my-lighting
Then restart ComfyUI and look under MY NODES → My Lighting. There are no model downloads and no extra Python dependencies - no requirements.txt at all, just the frontend JS plus ComfyUI's bundled aiohttp server. That makes this one of the rare custom nodes that's genuinely low-risk to install; no mysterious packages, no remote anything.
Gotchas
- Presets live in the node folder, not in your workflow. Saving a preset POSTs to
/my_lighting/presetson ComfyUI's server and writesmy_lighting_presets.jsonnext to the node. Share that JSON if you want someone to get your setups; your current scene itself is saved in the workflow (via the disabled widget), so collaborators at least see the generated prompt. - If the button or modal never appears, the JS didn't load - confirm
web/My_Lighting.jsexists after cloning and restart cleanly. This pack is new and barely covered anywhere online yet, so the README is the only documentation you'll find.
It's a small tool that does one job well. If you've ever squinted at a prompt trying to remember whether it's "rim light from the left" or "left rim light," you'll feel right at home.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| lighting_prompt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| lighting_prompt | STRING | — |