Lens Leaks
Lens flares and light leaks without owning a camera
- images
- IMAGE
You know that shot - a warm slash of light across the frame, a faint flare ghosting off a highlight - the thing that makes a still feel like film instead of pixels. LensLeaks is DJZ-Nodes' shortcut to it: it stamps synthetic light leaks or lens flares straight onto your images, no light source, no glass, no waiting for golden hour.
It's part of the same cinematic-effects family in this pack as the Panavision and VHS nodes. Where those go for authenticity, this one goes for mood. Think dreamy, washed-out color-grade overlays you'd normally fake in Photoshop with a gradient and a soft brush. Here it's one node in the graph.
How it works
Under the hood it's pure numpy/OpenCV. For lens_leaks it scatters a few radial-gradient blobs at random positions, tints each one warm orange, cool blue, or rainbow, and adds them to your image. For lens_flares it instead draws a streak of brightness along a horizontal line, controlled by flare_position. On top of that it can shift the red and blue channels apart for chromatic aberration and blow out a soft glow with bloom_radius. Nothing exotic - no models, no GPU work, runs happily on CPU.
The one thing worth knowing before you use it: there's no seed input. Leak positions are random every run, so you won't get identical leaks across two queues. That's fine for exploring, mildly annoying when you find one you love and want it back - you can't. Just re-roll.
The inputs that matter
Most of these you'll leave alone at first, but a few you'll actually touch:
- effect_mode -
lens_leaks(soft, scattered color blobs) orlens_flares(streaky highlights). Start here. - intensity - 0 to 1, how strongly the effect sits on top. Crank it to 1 and it'll wash the frame; 0.3–0.5 is the sweet spot for "it was filmed this way."
- leak_color - warm, cool, or rainbow. Warm reads like old film, rainbow reads like a music video.
- num_leaks / leak_size - how many blobs and how big. More isn't better; three is usually plenty.
The rest - chromatic_aberration, bloom_radius, flare_position - are flavor. Bloom at its default of 50 is a decent starting point; push chromatic_aberration up if you want that cheesy 80s VHS edge.
Output: a single IMAGE (same batch size you fed in), ready for Save Image, VHS_Effect, or whatever you're stacking it with.
Installing it
LensLeaks ships in the DJZ-Nodes pack, by Drift Johnson (mushroomfleet) - the same collection that has the datamosh and interlaced video nodes people actually seek out. Easiest route is ComfyUI Manager: Install Custom Nodes → search DJZ-Nodes → install, then restart ComfyUI. Or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/MushroomFleet/DJZ-Nodes
cd DJZ-Nodes
pip install -r requirements.txt
Then restart. One honest warning: this pack's requirements.txt is a kitchen sink - it pulls in librosa, numba, soundfile, trimesh, and friends that this node and most of the image effects never touch. They exist for the audio and 3D nodes elsewhere in the pack. If you're only here for lens effects, it's wasted disk but not a real problem.
Common issues
The realistic failure mode here is taste, not errors. Crank intensity and num_leaks together and you'll get a washed-out mess - back off one or the other. rainbow color with chromatic_aberration high looks like broken fiber optics, which is either exactly what you want or the opposite. If the node ever errors, it's almost always the heavy-dependency install step above missing OpenCV, so make sure requirements.txt actually completed. And if ComfyUI Manager's clone ever fails, the repo's had availability hiccups before (a 404 thread on r/comfyui in mid-2025) - retry, or use the manual git clone.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| effect_mode | COMBO | 2 options: lens_leaks, lens_flares | |
| intensity | FLOAT | 0.500–1 | — |
| leak_color | COMBO | 3 options: warm, cool, rainbow | |
| num_leaks | INT | 31–10 | — |
| leak_size | FLOAT | 0.300.1–1 | — |
| chromatic_aberration | FLOAT | 0.200–1 | — |
| bloom_radius | INT | 5010–200 | — |
| flare_position | FLOAT | 0.50–1 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |