Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sphere-Light-Render-ComfyUI
Widget to tell Flux 2 Klein 9B where the sun light comes from. To be used with Sun_direction_Lora for Flux2Klein
Install
Clone into your ComfyUI/custom_nodes/:
cd ComfyUI/custom_nodes/
git clone https://github.com/eric-venti-seeds/Sphere-Light-Render-ComfyUI.git
Restart ComfyUI. No additional Python dependencies for the core node.
Quick start
Download the Lora from here:
https://huggingface.co/eric-venti-seeds/Sun-Direction-Lora-Flux2Klein9B
The Node renders a 1024 x 1024 image as reference for the LoRA to understand where the light comes from
Nodes
Four nodes are registered under render/3d:
- 🔆 Sphere Light Render — the original all-in-one node (mode + location toggles).
- 🔆 Sphere Light — Manual — set the light directly with
rotation/elevation/intensity. - 🔆 Sphere Light — Sun (City) — position the light from a real sun: pick a city, set date/time, drag the compass.
- 🔆 Sphere Light — Sun (Coordinates) — same, but enter
latitude/longitudedirectly (timezone borrowed from the nearest listed city).
The three split nodes have no mode toggles — the node you pick is the mode. The all-in-one node remains for existing workflows.
Driving inputs from the graph
Every positioning parameter (heading, lat/lon, date/time, intensity, and Manual's
rotation/elevation) can be driven by an upstream node — wire a Primitive (or
any node whose value the browser can read) into the corresponding input. A
connected input wins over the on-node control; disconnect it and the slider /
compass / city search drives again, exactly as before. heading and city
already expose input sockets (the compass/search remain the manual control); the
other parameters are ordinary widgets you can connect to.
The sphere renders client-side (Three.js), and the browser bakes the resolved value into the rendered image before each run — so the output matches the driven value on the same queue (incrementing an animation frame-by-frame works). This means an open ComfyUI browser tab is required for driven inputs, and the driving value must be one the browser can resolve (a Primitive/static source, not a value computed mid-run by another node). A headless/API run, or a value that only exists during execution, isn't reflected — use the widgets for those.
Time of day
The node has two modes, chosen by the Light direction toggle at the top:
- Manual — set the light with the
rotationandelevationsliders (plusintensity). This is the default. - Date/time — position the light from a real sun position. Only this mode's inputs are shown, so the two modes never clutter each other.
In date/time mode, pick where the location comes from with the City / Coordinates toggle — only the active one is shown, so it's always clear which drives the sun:
- City — start typing a city and pick from the dropdown (e.g.
Austin, TX,London, UK,Tokyo, Japan). - Coordinates — for a place not in the bundled list (cities over ~15k
population), enter
latitude/longitudedirectly; the timezone is borrowed from the nearest listed city.
Set the date and time, then drag the compass dial to the direction the camera
faces (N at top, clockwise). A status line shows what was resolved
(☀ London, England) or warns when a city isn't found. Timezone and
daylight-saving are handled automatically. Rebuild the city list with
python tools/build_cities.py.