DreamLight Node
The FLUX-powered relight that ships what IC-Light V2 never did
- foreground_image
- background_image
- mask
- environment_map
- relit_image
Remember the IC-Light V2 that lllyasviel announced in 2024 and then never released the weights for? DreamLight is basically the community's answer to that: a relighting model built on a FLUX backbone instead of SD 1.5, wrapped up as a single ComfyUI node. You feed it a subject, a mask, and a new background - it re-lights the subject to match the new scene.
Fair warning up front: this is a young, obscure pack (basically no community footprint yet), it drags along the full gated FLUX.1-dev, and one of its headline features is a stub in the shipped code. If that hasn't scared you off, it's the closest thing to a runnable "IC-Light V2" you'll find.
Why you'd reach for it
Relighting is one of the hardest compositing problems - your subject was shot under one light, the new background under another, and pasting them together is an instant tell. IC-Light solved it for SD 1.5 and then froze; the job drifted toward instruction editors like Qwen-Image-Edit, which re-emit the whole frame and subtly change details like logos and stitching. DreamLight sits in the middle: a purpose-built relight that edits illumination while leaving structure alone, on a FLUX backbone. For product shots or portrait compositing where consistency beats edit-model hype, that's the slot it fills.
How it works
The node runs a fine-tuned FLUX.1-dev transformer (the DreamLight weights live on HuggingFace as LYAWWH/DreamLight). The trick is in the x_embedder: DreamLight trains FLUX with extra conditioning channels, so the node swaps in a new linear layer with one extra input per channel - one for the mask, plus one more if you pass an environment map - and copies the original weights into the left slice. Your mask becomes an extra input token telling the model what's foreground.
A CLIP vision encoder reads the background image, and the model generates the subject with lighting conditioned on that scene, the mask, and your text prompt. Output is a single relit_image IMAGE tensor, ready to composite back into your workflow.
The inputs that matter
Most of the seven inputs are obvious, and two are the whole game:
foreground_image/background_image- your subject and the scene it should live in.mask- the subject's cutout. This is where relighting lives or dies; a sloppy mask gives you halos and color bleed at the edges. Choke it a pixel and you'll thank yourself later.prompt(defaultharmonious, natural, photorealistic) - lighting guidance, in the IC-Light tradition of describing the light ("soft golden hour, rim light from the left").resolution(256–2048, default 1024) - the README's sweet spot, and the first thing to drop if you're OOMing.seedjust buys reproducibility, same as everywhere.
One honest caveat from the source: the optional environment_map input is wired up, but the spherical-harmonics math behind it is a placeholder in the shipped code - it computes a blank signal. Don't build a workflow around it yet. And the output comes back normalized to [-1, 1] instead of ComfyUI's usual [0, 1], so if the preview looks dark or clipped, rescale it before saving.
Installing it
Easiest path is ComfyUI Manager - search "ComfyUI DreamLight" (pack title ComfyUI DreamLight Node). Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/APZmedia/ComfyUI-Dreamlight
cd ComfyUI-Dreamlight
pip install -r requirements.txt
Here's the part the README is blunt about: FLUX.1-dev is gated. You need a HuggingFace token, you need to request access to black-forest-labs/FLUX.1-dev, and you need to wait for approval. Then copy .env.example to .env and set HF_TOKEN (or just export it in the shell that launches ComfyUI - same thing). First run then auto-downloads the FLUX pipeline (~23GB, though it'll reuse a transformer you already have in unet/ or checkpoints/) plus the DreamLight and CLIP weights, right at first inference.
Dependencies are unremarkable (diffusers pinned to 0.33.1, transformers, huggingface_hub, python-dotenv), but that pin can clash with other custom nodes expecting a newer diffusers - if your whole graph breaks after install, that's the first suspect.
Gotchas & troubleshooting
- "no file named diffusion_pytorch_model.bin found" - the FLUX download was incomplete. The README's manual-install section walks you through assembling the full
flux_completedirectory; the pack's own docs note the auto-setup had a history of 404s on file names that don't actually exist in FLUX.1-dev. - "Authentication failed / token required" - gated model, plain and simple. Check the token, check you were actually granted access, restart ComfyUI.
- Out of memory - drop
resolutionto 512. The README claims 8GB VRAM as the floor; treat that as optimistic. - First run is slow - it's downloading 23GB plus weights, not hanging. And if you'd rather it stop auto-downloading entirely,
DREAMLIGHT_SKIP_VALIDATION=1bypasses the model checks.
Honestly? For a quick, light relight on SD 1.5, kijai's ComfyUI-IC-Light is still the zero-friction choice. DreamLight is for when you're already on FLUX, want a relight that actually matches a real scene's lighting, and don't mind the gated-download gauntlet. Early, fiddly - and the Flux-relight that ships.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| foreground_image | IMAGE | — | |
| background_image | IMAGE | — | |
| mask | MASK | — | |
| prompt | STRING | harmonious, natural, photorealistic | — |
| seed | INT | 00–4294967295 | — |
| resolution | INT | 1024256–2048 | — |
| environment_mapopt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| relit_image | IMAGE | — |