Nodes/Sphere-Light-Render-ComfyUI/πŸ”† Sphere Light β€” Manual
ComfyUI Node

πŸ”† Sphere Light β€” Manual

Point the sun exactly where you want it β€” a reference sphere for the Sun-Direction LoRA

By eric-venti-seedsΒ·Created 2 months agoΒ·Updated 22 days agoΒ· 38
πŸ”† Sphere Light β€” Manual
    • render
    β—„rotation0β–Ί
    β—„elevation45β–Ί
    β—„intensity1.5β–Ί
    β—„render_b64β–Ί

    Ever begged the prompt gods for "warm sunlight from the left" and watched the model ignore you? That's the problem this whole pack exists to kill. The Sphere Light nodes render a little lit reference sphere that the Sun-Direction LoRA for Flux 2 Klein actually reads, so the light in your image goes where you tell it - not wherever the sampler feels like. This one, the Manual node, is the plainest of the four: you set the light by hand and it renders the sphere.

    The announcement thread for the LoRA on r/StableDiffusion nailed the vibe: "Finally, a way to tell the sun what to do instead of begging the prompt gods with 'sunlight from the left' 40 times." Lighting is the most reliable tell of an AI image - shadows pointing every which way, flat even illumination - and the photorealism writeups in this KB keep coming back to it. The LoRA fixes the direction; this node is the input device for that fix.

    What it actually does

    It renders a 1024Γ—1024 IMAGE of a gray sphere lit from one direction. That's it. You feed that image into your Klein workflow wherever the Sun-Direction LoRA expects its light reference, set the LoRA weight, and the model matches the sphere's light direction. No API, no key, no GPU math on your side - the node barely touches your video card.

    The mechanism is the interesting part, because it's mostly a trick. The Python side of the node does almost nothing: it decodes a base64 PNG hidden in a render_b64 widget and resizes it to 1024Β². The actual sphere is drawn in your browser with Three.js (r128, vendored into the repo so it works offline), and the browser bakes the rendered image into that base64 widget before each queue. So the heavy lifting is client-side - which is why the node has no Python dependencies at all beyond what ComfyUI already ships.

    The three inputs that matter

    • rotation (-180 to 180) - the light's azimuth around the sphere. Think of it as compass direction: sweep it and the lit side of the sphere swings around.
    • elevation (5 to 85, default 45) - how high the light sits above the horizon. 45 is a decent mid-morning/afternoon default; drop toward 5 for that long-shadow low sun, push it up for noon-ish flat light.
    • intensity (0.2 to 3, default 1.5) - how strong the light is. Crank it if the sphere reads too dim against your scene.

    The only output is render (IMAGE), and there's a hidden render_b64 string widget that manages itself - don't touch it.

    Install

    Clone it and restart:

    cd ComfyUI/custom_nodes/
    git clone https://github.com/eric-venti-seeds/Sphere-Light-Render-ComfyUI.git
    

    or search Sphere Light Render in ComfyUI Manager. Then download the actual LoRA from HuggingFace (Sun-Direction-Lora-Flux2Klein9B for the 9B, ...Klein4B for the 4B) - the nodes are useless without it. This pack is a thin one: no requirements.txt, no model files bundled, nothing heavy.

    Where people get burned

    Two gotchas, both from the README and both easy to hit. First, the sphere is rendered in your browser, so driven inputs need an open ComfyUI tab. If you wire a Primitive into rotation or elevation, a headless or API run won't reflect it - the browser never ran to bake the image. Use the widgets for anything automated. Second, if your render comes out flat gray, render_b64 was empty or unreadable - same cause, usually a headless run. Also expect your saved workflow JSON to balloon by 100–400 KB per sphere node; that baked base64 image travels with it. Annoying, but it's working as designed.

    Categoryrender/3d

    Inputs (4)

    NameTypeDefaultDescription
    rotationFLOAT0-180–180Light azimuth around the sphere, in degrees.
    elevationFLOAT455–85Light height above the horizon, in degrees.
    intensityFLOAT1.50.2–3Light strength.
    render_b64STRINGInternal: the browser-rendered sphere image (managed automatically).

    Outputs (1)

    NameTypeDescription
    renderIMAGEβ€”